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