python speed

Paul Boddie paul at
Wed Nov 30 17:07:37 CET 2005

Steven Bethard wrote:
> David Rasmussen wrote:
> > Faster than assembly? LOL... :)

Faster than physics? ;-)

> I think the claim goes something along the lines of "assembly is so hard
> to get right that if you can automatically generate it from a HLL, not
> only will it be more likely to be correct, it will be more likely to be
> fast because the code generator can provide the appropriate optimizations".

I think this is just a restatement of existing motivations for using
high-level languages and compilers. My impression is that PyPy takes
inspiration from work which showed that run-time knowledge can
sometimes produce code that is better optimised than that produced by a

That said, when everyone starts showing off their favourite benchmarks,
it might be more interesting not to parade some festival of arithmetic
yet again. Where more recent versions of the Java virtual machines have
improved is in their handling of object memory allocation, amongst
other things, and merely scoffing that Java is slow (by pulling
specific/specialised extension packages out of the hat) fails to
acknowledge the potential for similar improvements (and others) in
Python, especially where programs involving plain objects - as opposed
to numbers, and where no conveniently available and wrapped C/C++
package exists for the task - are concerned.


More information about the Python-list mailing list