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

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

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
June 5, 2001 04:20
Subject:
Re: Stacks, registers, and bytecode. (Oh, my!)
Message ID:
200106051119.MAA23072@gizmo.fdgroup.co.uk
Simon Cozens <simon@netthink.co.uk> opined:
> 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.

I think it would be very messy to have both types of operands in the same
dispatch loop. I'd much rather have a 'regex start' opcode which
calls a separate dispath loop function, and which then interprets any
further ops in the bytestream as regex ops. That way we double the number
of 8-bit ops, and can have all the regex-specific state variables (s, send
etc in the earlier example) and logic separated out.

> I don't know if I've mentioned this before, but 
> http://www-6.ibm.com/jp/developerworks/linux/001027/ruby_qa.html
> was my interview with Matsumoto about his ideas for Perl 6 and his experiences
> from Ruby. It's in Japanese, so http://www.excite.co.jp/world/url/ may help.

"A talk of jewelry
Perl developer From Mr. Simon Cozens to Ruby developer It is also as a pine
It dies and is the question and reply to Mr. [squiggle]"

:-)


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