[Python-Dev] new bytecode results

Neal Norwitz neal@metaslash.com
Fri, 28 Feb 2003 09:27:13 -0500


On Fri, Feb 28, 2003 at 09:48:32AM +0100, M.-A. Lemburg wrote:
> damien morton wrote:
> >>From: M.-A. Lemburg [mailto:mal@lemburg.com] 
> >>
> >>Back in the 1.5.2 days I played a lot with the ceval loop and 
> >>the best results I got came from:
> >>
> >>b) splitting the switch statement in two: the first one for
> >>   more commonly used opcodes, the second one for less often
> >>   used opcodes
> >
> >
> >Are you suggesting something like: 
> >
> >switch (opcode) {
> > case COMMON_OP:
> > case COMMON_OP:
> > ...
> > default:
> >   handle_uncommon_ops();
> >}
> 
> That's hard to do because the loop has so many variables
> to pass into handle_uncommon_ops(). I haven't tried
> it though (or at least I don't remember trying it :-),
> so perhaps this is even better.

The patch I mentioned before did that, but for all opcodes.
You could apply only part of the patch.  That may yield better
results.  But for all opcodes it was worse.

http://python.org/sf/693638

Neal