>>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:

  DS> At 09:07 PM 7/2/2001 +0100, Graham Barr wrote:
  >> 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.

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

do you mean the buffer pointer itself gets bumped when you chop off the
beginning? how would that allow GC since the collector wouldn't know
about the offset pointer? maybe there is a GC trick to do that. having
the offset means you don't lose the main buffer pointer so GC will be
simpler.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html

Reply via email to