Posts

Showing posts from July, 2006

python2.5. faster startup, better memory use, faster.

Recently I was testing that pygame still works with the python2.5 beta. When I was doing this, I had a chance to play around with python2.5 and all it's new goodness. Amongst the other good python2.5 features is that python is performing better. Almost twice as fast a startup 'cold'. This is because it uses half the number of syscalls as python2.4 does. 755 syscalls in 2.4 and 461 in 2.5. Still not quite as good as perl with 40ish syscalls, but a massive improvement none the less. $ time python2.4 -c "print 'hello'" hello real 0m0.923s user 0m0.041s sys 0m0.025s $ time python2.5 -c "print 'hello'" hello real 0m0.417s user 0m0.043s sys 0m0.021s However compared to perl, python is still syscall heavy. Perl does around 50ish syscalls to start up. Python2.5 also frees up more memory that it isn't using. Python2.4 does not release all that much memory if you use up quite a lot. It holds onto it in it's memory poo