On Friday 16 February 2001 15:35, Simon Cozens wrote:
> 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.
And address arithmetic and mem(cmp|cpy) is faster than array iteration.
--
Bryan C. Warnock
[EMAIL PROTECTED]