Why is a JIT compiler faster than a byte-compiler

RickMuller rpmuller at gmail.com
Thu Mar 24 10:44:30 EST 2005


I was talking to a friend of mine about the speed of Python code. One
of the questions that came up was why is a JIT compiler like Psyco
faster than the Python byte-compiler? I understand why languages like
Pyrex are faster, since they set static types that the compiler can use
to optimize. But why is Psyco faster? I would think that any
optimizations that Psyco makes could just as easily be made by the
byte-compiler, but obviously this is not the case, since Psyco runs
something like 4x faster, and I also understand that similar speedups
are seen by Java JIT compilers. What am I missing? Thanks in advance.

Rick




More information about the Python-list mailing list