[Numpy-discussion] iteration slowing, no increase in memory

Robert Kern robert.kern@gmail....
Fri Sep 11 16:31:21 CDT 2009

On Thu, Sep 10, 2009 at 14:39, David Warde-Farley<dwf@cs.toronto.edu> wrote:
> On 10-Sep-09, at 1:09 PM, Robert Kern wrote:
>> One thing you can do to verify this is to change the order of
>> iteration. You will also want to profile your code. Then you can see
>> what is taking up so much time.
>>  http://docs.python.org/library/profile
> Because apparently Robert is too modest to mention his own
> contribution to profiling:
> http://packages.python.org/line_profiler/

Not at all. It's just not relevant yet. line_profiler is good if you
know that a particular function is taking too long but don't know why.
You have to use cProfile first to figure out which function, if any,
is the bottleneck.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list