Speedup Bitmap Parser

Jayson Santos santosdosreis at gmail.com
Tue Feb 17 18:52:53 CET 2009

On 17 fev, 14:00, bearophileH... at lycos.com wrote:
> Jayson Santos:
> > After changing my code to use only functions instead classes
> > my code is too much faster.
> > Here cProfile statistcs:
> > Using old code : 633608 function calls in 1.361 CPU seconds
> > Using new code: 475487 function calls in 0.800 CPU seconds
> If you show a pastebin of the new version (you can also paste it, for
> reference for future people, when the pastebin will be deleted),
> probably there are ways to improve it more.
> And I also suggest you to try Psyco. (Someone recently has shown here
> a compiled version for Windows of Psyco for Python 2.6).
> Bye,
> bearophile

I'm using linux with python 2.5
Here is the result using psyco.full(): 93 function calls in 0.243 CPU
And here is the final code: http://pastebin.com/f3e20d669

More information about the Python-list mailing list