develooper Front page | perl.perl6.internals | Postings from August 2001

Re: Opcode Dispatch

Thread Previous | Thread Next
Dan Sugalski
August 4, 2001 12:23
Re: Opcode Dispatch
Message ID:
At 01:04 PM 7/30/2001 -0400, Bryan C. Warnock wrote:
>I'll also rework my code generator and the logic to ramp it up to four or
>five hundred opcodes, which would be a little better test, I think.
>Anything else I should add or tweak?

See what happens if you do a mixed switch/indirect dispatch table. I think 
we may stuff all the non-overridable opcodes (flow control, register ops, 
stack manipulations, and suchlike things) into the switch as entries with 
the rest as indirect calls in the default fallthrough. That'd get us the 
faster switch dispatch and still leave the flexibility of indirect functions.

We'd want to build the switch statement programmatically, of course, 
otherwise it's too much of a hassle to maintain. (I'm not sure there's 
going to be any piece of the core code that hasn't passed through a perl 
filter at some point in its life...)


--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai                         have teddy bears and even
                                      teddy bears get drunk

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About