At 09:07 PM 7/2/2001 +0100, Graham Barr wrote:
>On Mon, Jul 02, 2001 at 03:52:34PM -0400, Dan Sugalski wrote:
> > At 08:36 PM 7/2/2001 +0100, Simon Cozens wrote:
> > >On Mon, Jul 02, 2001 at 03:00:54PM -0400, Dan Sugalski wrote:
> > > > >what about starting offset? that is used now to shorten a string from
> > > > >the left side.
> > > >
> > > > D'oh! In. Out goes the unused.
> > >
> > >Whoa there. Do we still actually want to do this? It's unclear whether
> > >or not it's actually a net win.
> >
> > A valid point. It doesn't seem to be used at all often, but it's always
> > tough to equate frequency of appearance to frequency of usage.
>
>I for one use s/^...// quite often in the knowledge that it is optimized to
>just move a pointer and not cause a copy of the string.

We'll still be doing that. (The leftover memory will get cleaned up when we 
GC) The bigger issue is when we need to move the pointer back because we've 
stuck something back on the front of the string.

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to