benchmarks and questions for new python programmer

stormslayer demarchi at duke.edu
Mon May 17 08:09:10 EDT 2004


Thanks for all the help.  Mike is correct -- the integer random number
gen from the math library isn't all that good and is causing the
slowdown.  And thanks to Terry for math lib suggestions.  You folks
are great.

I got a bunch of emails saying that one shouldn't benchmark languages
this way, or do so without knowing the language really well, or that
my code wasn't pythonish enough.  You folks need to wake up and smell
the compilers (or interpreters).  The whole point of a tool such as a
compiler or interpreter is to take reasonable code (and in this case,
my algorithm is certainly that -- the fault wasn't in my code but in a
python function) and generate reasonable program speeds.  Sure,
experts should be able to fiddle and get something more out of it, but
the whole attraction of python for me is that it looks like pseudo
code.  If you can't write things the way you think, then it isn't much
help to use python.  It is still the case that unoptimized code in
borland's C++ is 5x faster than python (and that's for a windows
program w/ dialog boxes, etc. rather than a console app), and this is
distressing, but I'll keep trying w/ python.  Python is beautiful...

Thanks again for all the help.
sd



More information about the Python-list mailing list