Why doesn't JUMP_IF_FALSE do POP_TOP ?

Terry Reedy tjreedy at udel.edu
Sun Jan 12 16:28:45 EST 2003


"Bengt Richter" <bokr at oz.net> wrote in message
news:avshv5$kp8$0 at 216.39.172.122...
> It seems like usually POP_TOP is the next byte code on either
branch.
> Or is there a difficult case where the value is needed on the stack?
> It seems like the 99% case is getting the overhead (and also making
the
> polling interval counter count unnecessary codes).

I asked exactly this question last Aug 2 in a thread entitled Python
Bytecode.
http://tinyurl.com/4d64 will take you to a google page with the
responses.
Had to do with short-circuiting logic (and/or), including that
generated by chained comparisons (1 < x < 9).  Some sense that it
might be changed when compiler is rewritten.

Terry J. Reedy






More information about the Python-list mailing list