Re: Copy-on-write strings

2002-05-10 Thread Graham Barr
On Fri, May 10, 2002 at 12:12:41PM -0400, Dan Sugalski wrote: > At 5:38 PM +0200 5/10/02, Peter Gibbs wrote: > >The result is that the last header of a COWed string will still believe that > >the buffer is shared until a GC collection run occurs, and therefore could > >result in buffers being copi

Re: Copy-on-write strings

2002-05-10 Thread Dan Sugalski
At 5:38 PM +0200 5/10/02, Peter Gibbs wrote: >The result is that the last header of a COWed string will still believe that >the buffer is shared until a GC collection run occurs, and therefore could >result in buffers being copied unnecessarily. Your system eliminates this >problem; however, I bel

Re: Copy-on-write strings

2002-05-10 Thread Peter Gibbs
Hi Nicholas The final design is now waiting on Dan, but it is always interesting to see other ideas. Like you, I rejected the parent/child technique. However, my proposed solution did not use any links at all, because it relies on the garbage collection system to determine when a shared buffer h

Re: Copy-on-write strings

2002-05-09 Thread Peter Gibbs
- Original Message - From: "Dan Sugalski" <[EMAIL PROTECTED]> > Actually, we don't. (Sez the man catching up on altogether too much > mail) Since we're putting the COW stuff at the tail end, substrings > of COW strings are fine. You set the bufstart to where the substring > starts, buflen

Re: Copy-on-write strings

2002-05-09 Thread Dan Sugalski
At 10:58 AM +0200 5/6/02, Peter Gibbs wrote: >The COWing of substrings requires a major interface change: >*** All references to the data in a STRING must use the new strstart pointer >instead of bufstart *** Actually, we don't. (Sez the man catching up on altogether too much mail) Since we're p

Re: copy-on-write

2001-12-01 Thread Bryan C. Warnock
On Saturday 01 December 2001 09:24 pm, Bryan C. Warnock wrote: {snip} Er, obviously, s/is/should be/g in my response. -- Bryan C. Warnock [EMAIL PROTECTED]

Re: copy-on-write

2001-12-01 Thread Bryan C. Warnock
On Saturday 01 December 2001 01:50 pm, Jeff 'japhy' Pinyan wrote: > $x = "_" x 100_000; > $a = $x; $b = $x; $c = $x; > > $x is now copy-on-write, with three dependents. > > $x = "foo"; > > According to you model, we've just copied 300,000 bytes. Personally, I > find that unacceptable. Be

RE: copy-on-write

2001-12-01 Thread Dan Sugalski
At 09:30 AM 12/1/2001 -0800, Brent Dax wrote: >First of all, you sent us this already. :^) > >Jeff 'japhy' Pinyan: ># I'm writing a simple language to embody the concept of ># copy-on-write, and ># so that I can learn how to implement it. The language is ># called COW and ># it's at ># ># http

Re: copy-on-write

2001-12-01 Thread Uri Guttman
> "J'P" == Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> writes: J'P> $x = "_" x 100_000; J'P> $a = $x; $b = $x; $c = $x; J'P> $x is now copy-on-write, with three dependents. J'P> $x = 'foo'; J'P> We copy the 100,000 byte string to $a, $a gets $b and $c as dependents, J'P> an

RE: copy-on-write

2001-12-01 Thread Jeff 'japhy' Pinyan
On Dec 1, Brent Dax said: >First of all, you sent us this already. :^) Well, I sent it before I subscribed (and from a different account entirely) and it hadn't showed up in the archives 12 hours after posting, so I figured it was dixed. ># So what's copy-on-write? Basically, it's the use of

RE: copy-on-write

2001-12-01 Thread Brent Dax
First of all, you sent us this already. :^) Jeff 'japhy' Pinyan: # I'm writing a simple language to embody the concept of # copy-on-write, and # so that I can learn how to implement it. The language is # called COW and # it's at # # http://japhy.perlmonk.org/COW/ # # Ben Tilly suggested I con