STRINGs, COW, and Mutation

chromatic chromatic at wgz.org
Wed Dec 23 19:47:12 UTC 2009


On Wednesday 23 December 2009 at 11:41, Andrew Whitworth wrote:

> A total benchmark improvement of ~3.7% is certainly nothing to ignore.
> However, this isn't going to be a 100% gain: we do after all need to
> factor in the need to create new string headers and possibly allocate
> new buffer storage on string modifications. We're going to be better
> than even, but I don't thnk we're going to be at 3.7% after all those
> changes are made.

The question is whether we pay the price of allocating a new COW header for 
every STRING we don't want anything else to modify or allocating a new header 
for every STRING we know is a modification.

> Besides the few test cases that you mention, do we have a lot of
> places where strings are specifically used with reference semantics in
> order to do inplace modifications in multiple places in the code? That
> is, is this going to be a huge change to existing PIR code?

I don't know that the test suite is representative of existing code.  Allison 
suggested asking HLL developers and people who've written PIR libraries about 
their expectations of STRINGs in S registers in PIR.

-- c 


More information about the parrot-dev mailing list