Python speed vs csharp

Mike mike at nospam.com
Sat Aug 2 20:43:15 CEST 2003


On Thu, 31 Jul 2003 22:25:55 -0500, Greg Brunet wrote:
 
> I'm just a little curious how test code runs 10 million cycles in 210
> seconds, while production code with runs 1.5 billion cycles in 3500
> seconds.  That makes your production code more efficient by roughly a
> factor of 10.  If so, even though folks are only quoting an improvement
> factor of about 3x for Pysco and 5-6x with Pyrex, that may be sufficient
> enough for your needs.

Ugh. Because I can't be trusted with a calculator, that's why. 1.5 billion
should be 150 million. The elapsed times are correct: 210 seconds and 3500
seconds. 

Using psyco, the test case runs in 43 seconds. I was able to reduce that to
25 seconds using some of the improvements that Bengt Richter provided. I
was able to reduce the full simulation time down to 647 seconds; I'm sure
more improvements are possible, since I haven't implemented all of Bengt's
improvements. Part of the problem with the full simulation is that psyco
gobbles up all my available memory if I use psyco.full(), so I've been
experimenting with psyco.bind(). 647 seconds is my best result so far.

-- Mike -- 




More information about the Python-list mailing list