[BangPypers] regarding profiling
basilkurian at gmail.com
Wed Oct 17 20:03:13 CEST 2012
Thanks Sriram for the suggestions.
This is the puzzle that I 'm trying to solve.
My program is giving correct output for the sample inputs, given with the
question. However for a bigger input data , it is taking too much time. Let
me see if I could generate a bigger input for the program
On 17 October 2012 22:51, Sriram Karra <karra.etc at gmail.com> wrote:
> On Wed, Oct 17, 2012 at 7:42 PM, Basil Kurian <basilkurian at gmail.com>
> > Hi
> > I 'm trying out some python puzzles in interviewstreet.com. Most of the
> > time , when I submit my code , during testing process , it will get timed
> > out since the execution is taking too much time (for big input values).
> > I tried profiling the program execution using cprofile. Still can't
> > find any operations that is taking too much time.
> I did not try too hard, but reading your code I can't figure out what it's
> trying to achieve. I have two suggestions:
> 1. You obviously have a nested loop 3 levels deep, which has to be your
> number 1 suspect. Perhaps it is not required to solve the problem, and a
> different approach is called for. Describe the problem statement in brief
> and someone may be able to shed some light.
> 2. Write a small script to generate very large input test files so you can
> get more meaningful profile information from cprofile.
> BangPypers mailing list
> BangPypers at python.org
More information about the BangPypers