[Python-Dev] DUP_TOPX

Raymond Hettinger Raymond Hettinger" <python@rcn.com
Fri, 10 Jan 2003 05:02:52 -0500


During a code review, Neal Norwitz noticed that ceval.c
defines DUP_TOPX for x in (1,2,3,4,5) but that compile.c
never generates that op code with a parameter greater than
three.

The question of the day is whether anyone knows of a 
reason that we can't or shouldn't remove the code for 
the 4 and 5 cases.  Is there anything else (past or present)
that can generate this opcode?

Taking it out is only a microscopic win, a few saved brain 
cycles and a smaller byte size for the main eval loop 
(making it slightly more likely to stay in cache).

Also, we wanted to know if anyone still had a use for the
LLTRACE facility built into ceval.c.  It's been there since
'92 and may possibly not longer be of value.


Raymond Hettinger