Forth like interpreter

Greg Ewing greg at cosc.canterbury.ac.nz
Mon Mar 13 20:17:51 EST 2000


Christian Tismer wrote:
> 
> The real "overhead" is the check on default (cmp eax, 140)

In principle, this check could be eliminated by making the
jump table have a full 256 entries and filling the unused
ones with pointers to the default branch. 

Whether any C compiler could be persuaded to do this I don't 
know. What about writing the switch statement with explicit
cases for all the unused opcodes? Seems like it should work,
unless the compiler is trying to be just *too* smart...

-- 
Greg Ewing, Computer Science Dept,
+--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+



More information about the Python-list mailing list