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

RE: Stacks, registers, and bytecode. (Oh, my!)

Thread Previous | Thread Next
From:
Hong Zhang
Date:
June 5, 2001 10:47
Subject:
RE: Stacks, registers, and bytecode. (Oh, my!)
Message ID:
400CE9390E334A4393CEECDD6863120A289EE5@ussccm003.corp.palm.com
> 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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About