Re: [Python-Dev] [ANN] superinstructions (VPython 0.1)

2008-10-24 Thread J. Sievers
Antoine Pitrou [EMAIL PROTECTED] writes: Hi, J. Sievers cadr4u at gmail.com writes: A sequence of code such as LOAD_CONST LOAD_FAST BINARY_ADD will, in CPython, push some constant onto the stack, push some local onto the stack, then pop both off the stack, add them and push the result

Re: [Python-Dev] [ANN] VPython 0.1

2008-10-24 Thread J. Sievers
M.-A. Lemburg [EMAIL PROTECTED] writes: [snip] BTW: I hope you did not use pybench to get profiles of the opcodes. That would most certainly result in good results for pybench, but less good ones for general applications such as Django or Zope/Plone. Algorithm used for superinstruction

Re: [Python-Dev] [ANN] VPython 0.1

2008-10-24 Thread J. Sievers
Daniel Stutzbach [EMAIL PROTECTED] writes: [snip] I searched around for information on how threaded code interacts with branch prediction, and here's what I found. The short answer is that threaded code significantly improves branch prediction. See ``Optimizing indirect branch

Re: [Python-Dev] [ANN] VPython 0.1

2008-10-24 Thread J. Sievers
Greg Ewing [EMAIL PROTECTED] writes: Daniel Stutzbach wrote: With threaded code, every handler ends with its own dispatcher, so the processor can make fine-grained predictions. I'm still wondering whether all this stuff makes a noticeable difference in real-life Python code, which spends

Re: [Python-Dev] [ANN] VPython 0.1

2008-10-24 Thread J. Sievers
[EMAIL PROTECTED] writes: On 23 Oct, 10:42 pm, [EMAIL PROTECTED] wrote: Guido van Rossum wrote: there already is something else called VPython Perhaps it could be called Fython (Python with a Forth-like VM) or Thython (threaded-code Python). I feel like I've missed something important, but,

Re: [Python-Dev] [ANN] VPython 0.1

2008-10-23 Thread J. Sievers
Hey, I hope you don't mind my replying in digest form. First off, I guess I should be a little clearer as to what VPthon is and what it does. VPython is essentially a set of patches for CPython (in touches only three files, diff -b is about 800 lines IIRC plus the switch statement in ceval.c's

[Python-Dev] [ANN] VPython 0.1

2008-10-22 Thread J. Sievers
Hi, I implemented a variant of the CPython VM on top of Gforth's Vmgen; this made it fairly straightforward to add direct threaded code and superinstructions for the various permutations of LOAD_CONST, LOAD_FAST, and most of the two-argument VM instructions. Sources: