[tree-ssa] computed gotos

Paolo Bonzini bonzini@gnu.org
Fri Jan 24 22:24:00 GMT 2003


> What does the switch look like?
> Can you hand me some code where the
> performance depends on the use of computed gotos?

That's not the code body that Brad was referring to, but GNU Smalltalk does
achieve a 30% speed increase thanks to computed gotos.  The vector of labels
to which each bytecode is dispatched is changed on the fly when an interrupt
event happens so that the next computed goto will jump to the code that
reacts to the interrupt.  The alternative is to do an if every few bytecodes
(e.g. a method call and a backwards jump).

See the libgst/interp-bc.inl file in any version of GNU Smalltalk.

Paolo





More information about the Gcc-patches mailing list