Re: [Python-Dev] Do more at compile time; less at runtime

2012-12-11 Thread Guido van Rossum
+1 On Dec 11, 2012 8:47 AM, "Ned Batchelder" wrote: > On 12/9/2012 5:22 PM, Mark Shannon wrote: > >> The current CPython bytecode interpreter is rather more complex than it >> needs to be. A number of bytecodes could be eliminated and a few more >> simplified by moving the work involved in handli

Re: [Python-Dev] Do more at compile time; less at runtime

2012-12-11 Thread Ned Batchelder
On 12/9/2012 5:22 PM, Mark Shannon wrote: The current CPython bytecode interpreter is rather more complex than it needs to be. A number of bytecodes could be eliminated and a few more simplified by moving the work involved in handling compound statements (loops, try-blocks, etc) from the interp

Re: [Python-Dev] Do more at compile time; less at runtime

2012-12-10 Thread Victor Stinner
Do know my registervm project? I try to emit better bytecode. See the implementation on http://hg.python.org/sandbox/registervm See for example the documentation: hg.python.org/sandbox/registervm/file/tip/REGISTERVM.txt I implemented other optimisation

Re: [Python-Dev] Do more at compile time; less at runtime

2012-12-09 Thread MRAB
On 2012-12-09 22:22, Mark Shannon wrote: Hi all, The current CPython bytecode interpreter is rather more complex than it needs to be. A number of bytecodes could be eliminated and a few more simplified by moving the work involved in handling compound statements (loops, try-blocks, etc) from the

Re: [Python-Dev] Do more at compile time; less at runtime

2012-12-09 Thread Nick Coghlan
Interesting idea, main challenge is to keep stepping through the code with pdb sane, and being clear on what differences in behaviour will be visible to the runtime execution hooks. -- Sent from my phone, thus the relative brevity :) ___ Python-Dev maili

Re: [Python-Dev] Do more at compile time; less at runtime

2012-12-09 Thread Guido van Rossum
Sounds good to me. No PEP needed, just a tracker item, tests, review etc... --Guido van Rossum (sent from Android phone) On Dec 9, 2012 2:24 PM, "Mark Shannon" wrote: > Hi all, > > The current CPython bytecode interpreter is rather more complex than it > needs to be. A number of bytecodes could

[Python-Dev] Do more at compile time; less at runtime

2012-12-09 Thread Mark Shannon
Hi all, The current CPython bytecode interpreter is rather more complex than it needs to be. A number of bytecodes could be eliminated and a few more simplified by moving the work involved in handling compound statements (loops, try-blocks, etc) from the interpreter to the compiler. This sim