Predereferencing is an optimization technique used by the Parrot virtual machine (the virtual machine under development for Perl 6). The technique first appeared in Parrot version 0.0.4). The input bytecode array is transformed into a corresponding "predereferenced" bytecode array where opcodes are replaced by function pointers to the opcode handling functions, and register numbers are replaced by pointers to the register data structures themselves (thus de-referencing the elements of the bytecode before it is run). This technique provides a modest speed improvement without Just-in-time compilation. In Parrot, the technique has been merged with the Computed GOTO and JIT core functions, providing an even greater performance gain.
|