Bart Lateur wrote:
> On 20 Sep 2000 04:07:27 -0000, Perl6 RFC Librarian wrote:
>
> >Where an array is declared without ':bounds', @# returns the largest
> >bounds of each dimension that has been accessed:
>
> Wouldn't that be slow?
>
It depends. The array creation RFC proposes that LOLs declared with a simple
type be stored as compact arrays. In this case their bounds would have be to
stored internally (otherwise the indexes of the data structure can not be
derived). The only difference between this and using :bounds is that :bounds
turns off autovivification and turns on bounds checking exceptions.

If it is a good-old-fashioned Perl 5 list of lists, then yes, finding the
bounds would be slow (by some definition of slow). But it would be faster
than a pure Perl approach... I don't imagine @# being much used outside of
typed arrays, however.


Reply via email to