Am Donnerstag 27 Januar 2005 21:36 schrieb Francesc Altet:
So, I've tried to run the profile module included in the standard library in order to see which are the hot spots in python:
$ time ~/python.nobackup/Python-2.4/python -m profile -s time create-numarray.py 1016105 function calls (1016064 primitive calls) in 25.290 CPU seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function) 1 19.220 19.220 25.290 25.290 create-numarray.py:1(?) 999999 5.530 0.000 5.530 0.000 numarraycore.py:514(__del__)
Might it actually be that (at least part of) the speed problem lies in __del__? I don't have any tools for benchmarking at hand, so I can only ask other to experiment, but I recall that it already struck me odd a little while ago, that hitting Ctrl-C in the middle of numarray-calculations nearly always gave me a backtrace ending inside a __del__ function. Should be trivial to test: deactivate __del__ completely for a test run. Ciao, Norbert -- _________________________________________Norbert Nemec Bernhardstr. 2 ... D-93053 Regensburg Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199 eMail: <Norbert@Nemec-online.de>