develooper Front page | perl.perl6.language | Postings from May 2001

Re: what I meant about hungarian notation

Thread Previous | Thread Next
From:
Me
Date:
May 10, 2001 17:32
Subject:
Re: what I meant about hungarian notation
Message ID:
049601c0d9b0$d87fcea0$6501a8c0@me
Larry:
> : > Currently, @ and [] are a promise that you don't intend to use
string
> : > indexing on this variable.  The optimizer can make good use of
this
> : > information.  For non-tied arrays of compact intrinsic types, this
> : > is going to be a major performance win in Perl 6.

Clearly the promise can be broken, so there has
to be a check somewhere along the line, right?

If there is, and the check shows you don't have a
(reasonable) integer, then perl can just switch to
a hash lookup. I'd assume you are doing
something vaguely similar to this any way, to do
sparse arrays.

If such a check is done, and the compiler code
is written appropriately, there should be no
reason why it incurs extra machine instructions
in the event of there being an integer subscript.


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