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

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

Thread Previous | Thread Next
From:
Larry Wall
Date:
June 4, 2001 17:57
Subject:
Re: Stacks, registers, and bytecode. (Oh, my!)
Message ID:
200106050053.RAA28399@kiev.wall.org
Dan Sugalski writes:
: Yeah, a lot of that's definitely a problem, as is the manipulation of the 
: return stack and some assignment bits. (You can cut the time split takes in 
: half by having the destination array presized, for example)

That's why the current version Perl goes to a great deal of trouble to
hang onto its allocations from previous iterations/invocations, on the
theory that if you needed N elements last time, you'll probably need
about N elements again this time.  In changing how locals are generated
for Perl 6, it would be easy to lose such optimizations accidentally,
and that might be unfortunate.  It may be that there's a middle ground,
where by saving only the information and not the actual allocation, we
can estimate how much to reallocate the next time through without
actually hanging on to the memory in question.

Larry

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