> 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

Reply via email to