On Fri, Feb 16, 2001 at 12:32:10PM -0800, Hong Zhang wrote:
> Did it buy you much? I don't believe so. Can you give some examples why
> random character access is so important?

substr's already been mentioned.

Regular expressions. Perl does rather a lot of them. We've already found from
Perl 5 development that they get nasty when variable length data is involved.

And it's not so much that you get O(1) access, but also the fact that the
constant is lower. chop(), s/.// and the like are much more efficient *and*
much easier to code if you know how many bytes you're taking off beforehand.

-- 
A year spent in artificial intelligence is enough to make one believe in God.

Reply via email to