> On Tue, Jun 05, 2001 at 11:25:09AM +0100, Dave Mitchell wrote: > > This is the bit that scares me about unifying perl ops and regex ops: > > can we really unify them without taking a performance hit? > > Coupl'a things: firstly, we can make Perl 6 ops as lightweight as we like. > > Second, Ruby uses a giant switch instead of function pointers for their > op despatch loop; Matz says it doesn't make that much difference in > terms of performance. Function pointer dispath is normally faster or as fast as switch. The main down side is the context. A typical regular expression engine can pre-fetch many variables into "register local", they can be efficiently used by all switch cases. However, the common context for regular expression is relative small, I am not sure of the performance hit. Hong
- Re: Stacks, registers, and bytecode. (Oh, my!) Larry Wall
- Re: Stacks, registers, and bytecode. (Oh, my!) Jarkko Hietaniemi
- Re: Stacks, registers, and bytecode. (Oh, my!) Bryan C . Warnock
- Re: Stacks, registers, and bytecode. (Oh, my!) Larry Wall
- Re: Stacks, registers, and bytecode. (Oh, my!) Jarkko Hietaniemi
- Re: Stacks, registers, and bytecode. (Oh, my!) Dave Mitchell
- Re: Stacks, registers, and bytecode. (Oh, my!) Simon Cozens
- Re: Stacks, registers, and bytecode. (Oh, my!) Dave Mitchell
- Re: Stacks, registers, and bytecode. (Oh, my!) Dave Storrs
- Re: Stacks, registers, and bytecode. (Oh, my!) Dan Sugalski
- Re: Stacks, registers, and bytecode. (Oh, my!) Hong Zhang
- Re: Stacks, registers, and bytecode. (Oh, my!) Graham Barr
- Re: Stacks, registers, and bytecode. (Oh, my!) David L. Nicol
- Re: Stacks, registers, and bytecode. (Oh, my!) Graham Barr