New submission from Jurjen N.E. Bos <j...@users.sourceforge.net>: I found a very simple way to improve the speed of CPython a few percent on the most common platforms (i.e. x86), at the cost of only a few lines of code in ceval.c The only problem is that I don't have any experience in patch submission.
Here are the suggested new lines (also see submitted file): #define NEXTARG() (next_instr +=2, *(unsigned short*)&next_instr[-2]) #define PEEKARG() (*(unsigned short*)&next_instr[1]) of course this code only works on little-endian processors that allow nonaligned shorts; a change to configure might be needed (*shiver*). Hope you like it. ---------- components: Interpreter Core files: speedpatch.c messages: 127686 nosy: jneb priority: normal severity: normal status: open title: Speeding up the interpreter with a few lines of code type: performance versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20638/speedpatch.c _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11087> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com