guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: food for thought re: string representations ["Boehm, Hans" <address@


From: Michael Livshin
Subject: Re: food for thought re: string representations ["Boehm, Hans" <address@hidden>] RE: Re: [gclist] ref-counting performance cost
Date: 13 Oct 2000 13:14:13 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (20 Minutes to Nikko)

Dirk Herrmann <address@hidden> writes:

> Thus, if guile would be changed to use a copy-on-write string
> implementation, every use of SCM_STRING_CHARS would have to be
> revisited with respect to thread safety, making sure that the
> corresponding pointer remains valid throughout its use.

which kinda begs the question what exactly is won by using
copy-on-write...

the more I think about it, the more I convince myself that the SGI STL
implementors did the right thing by providing _two_ string
implementations, where one (basic_string) is simple and OK for short
strings, and the other (rope) is better for large strings when the
cost of copying becomes large and the cost of added synchronization
becomes acceptable by comparison.  perhaps we could do the same, with
the representation chosen authomatically by Guile when a string is
created.

-- 
I'm on a seafood diet -- I see food and I eat it.           -- anonymous




reply via email to

[Prev in Thread] Current Thread [Next in Thread]