Python performance notes...

Courageous jkraska1 at san.rr.com
Thu May 25 10:26:13 EDT 2000


> >I did a simple for loop and tested it, trying a variety of length
> >loops. It took a bit of time to get this right, as for smaller
> >loops, the test was biased by the relative high cost of function
> >invocation. When it settled out, a for-loop in python is about 100
> >times slower in python than the equivalent in ANSI C. Irrespective of
> >function invocation overhead, the decision to go native pays off almost
> >immediately, with time differences in python versus native code being
> >noticeable with as low as 100,000 simple iterations.
> 
> So?  What's your point?

My point was that it was likely that the very worse case
in python is 100 times slower than C. That's important information
to some folks, giving them a bit of a metric to compare against
other environments. [snip follow-on rant where you attempt to
preach to the choir].

I'll be running a more extensive test involving a native versus
non native heap sort in a week or two.

C/



More information about the Python-list mailing list