[Python-Dev] ndPython (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Wed Jun 24 19:41:39 CEST 2009


Filippo Battaglia <pegasus2000 email.it> writes:

http://www.psp-ita.com/forum/viewtopic.php?t=28323&start=20 from ndpsp import * x = time.clock () for i in range(1000): pass print >> clock, "1.", time.clock()-t

First, it has been noted that your message would better be sent to python-list.

You must provide a working code example that doesn't need any "ndpsp" import to work. Also, since it is about porting Python to a particular platform, please enlighten us as to what type of CPU it uses, what compiler, what optimization options were used etc.

As a sidenote, a common way of timing small snippets of Python code is by using the "timeit" module. From the command line, you could write:

$ python -m timeit "for i in range(1000): pass" 10000 loops, best of 3: 87.2 usec per loop

If you don't spend at least a bit of time writing your message clearly and giving enough details, nobody will spend their unpaid voluntary time trying to understand what happens.

Regards

Antoine.



More information about the Python-Dev mailing list