New submission from Antoine Pitrou <pit...@free.fr>: There is no patch here, this entry is just a reminder of some of the ideas that have been suggested to experiment with ways to speedup the Python VM (djc, who is nosied, has said he'd be willing to try working on it):
- unify the local variables and constants arrays (this costs a copy of the constants array at each frame creation, but it should be negligible since frames are reused and the copy can probably be a dumb memcpy) - devise new instructions, or a whole new instruction set, which takes its arguments from this array As a simple way to experiment, one could start with a new instruction named e.g. BINARY_ADD_FAST which would take one 16-bit arg, whose 8 upper bits would be the index of the first argument, and whose 8 lower bits would be the index of the second argument. The result would be pushed on top of the stack. It could also be measured whether having a special value (255) to mean "pop the argument off the pop of the stack" gives negative (because of overhead) or positive (because of less bytecode) results. ---------- components: Interpreter Core messages: 82756 nosy: collinwinter, djc, jyasskin, pitrou priority: normal severity: normal status: open title: Unified locals/consts array + register-based instructions type: performance versions: Python 2.7, Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5375> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com