[Python-Dev] opcode dispatch optimization (original) (raw)
Christian Heimes lists at cheimes.de
Wed Dec 31 18:44:27 CET 2008
- Previous message: [Python-Dev] opcode dispatch optimization
- Next message: [Python-Dev] opcode dispatch optimization
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Antoine Pitrou wrote:
I would like to mention that I've written a patch which enables "threaded interpretation" on the ceval loop with gcc (*). On my computer (an Athlon X2 3600+), it is good for a 15-20% speedup of the interpreter on pystone and pybench. I also had the opportunity to test it on a Core2-derived CPU, where it doesn't make a difference (I conjecture it's because Core2 CPUs have hardware-based indirect branch optimizations). It will make no difference if the interpreter is compiled with something else than gcc (I tested on Windows).
The patch makes use of a GCC feature where labels can be used as values: http://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html . I didn't know about the feature and got confused by the unary && operator.
A happy new your to you all!
Christian
- Previous message: [Python-Dev] opcode dispatch optimization
- Next message: [Python-Dev] opcode dispatch optimization
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]