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

RE: Yet another switch/goto implementation

Thread Previous | Thread Next
From:
Brent Dax
Date:
November 5, 2001 09:12
Subject:
RE: Yet another switch/goto implementation
Message ID:
FJELLKOPEAGHOOODKEDPOEFDCJAA.brentdax@cpan.org
Daniel Grunblatt:
# No, I totally disagree on that if I do that we will lose the
# speed gained
# before, I still don't know why we can't stay we the actual
# dispatch method
# when tracing, etc and use computed goto when running without
# any command
# line switch?

If we enable tracing with computed goto, we should only expect to get
better performance than tracing with switch or tracing with
function-pointer.  What I'm saying is:

	op27:
		/* stuff */
		pc+=3;
		/* tracing or whatever code goes here */
		goto *lookup[*pc];

That'll still be faster than switch()ing or function-pointer; it just
won't be as fast as untracing, which I think users can accept and
understand.

--Brent Dax
brentdax@cpan.org
Configure pumpking for Perl 6

When I take action, I'm not going to fire a $2 million missile at a $10
empty tent and hit a camel in the butt.
    --Dubya


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