[Python-Dev] Wordcode: new regular bytecode using 16-bit units

Raymond Hettinger raymond.hettinger at gmail.com
Mon Apr 25 02:51:51 EDT 2016


> On Apr 24, 2016, at 2:31 PM, Victor Stinner <victor.stinner at gmail.com> wrote:
> 
> 2016-04-24 23:16 GMT+02:00 Raymond Hettinger <raymond.hettinger at gmail.com>:
>>> On Apr 24, 2016, at 1:16 PM, Victor Stinner <victor.stinner at gmail.com> wrote:
>>> I proposed to not try to optimize ceval.c to fetch (oparg, opval) in a
>>> single 16-bit operation. It should be easy to implement it later, but
>>> I prefer to focus on changing the format of the bytecode.
>> 
>> Improving instruction decoding was the whole point and it was what kicked-off the work on the patch.  It is also where most of the performance improvement comes from and isn't the difficult part of the patch. The persnickety parts of the patch lay elsewhere, so there is really nothing to be gained gutting out our actual objective.
>> 
>> The OPs original patch had already gotten this part done and it ran fine for me.
> 
> Oh wait, my phrasing is unclear. I do want optimize the (opcode,
> oparg) fetch, I just suggested to split the patch in two parts, and
> first review carefully the first part.

Unless it is presenting a tough review challenge, we should do whatever we can to make it easier on the OP who seems to be working with very limited computational resources (I had to run the benchmarks for him because his setup lacked the requisite resources).  He's already put a lot of work into the patch which is pretty good shape when it arrived.  

The opcode/oparg fetch logic is mostly already isolated to the part of the patch that touches ceval.c.  I found that part to be relatively clean and clear.  The part that took the most time to go through was for peephole.c.

How about we let Yury and Serhiy take a pass at it as is.  And, if they would benefit from splitting the patch into parts, then perhaps one of us with better tooling can pitch in to the help the OP.


Raymond






More information about the Python-Dev mailing list