Rope PMC (was Re: Why has pbc_to_exe become unusable?)

Will Coleda will at
Thu Apr 22 16:59:35 UTC 2010

On Thu, Apr 22, 2010 at 12:54 PM, Jonathan Leto <jaleto at> wrote:
> Howdy
> On Thu, Apr 22, 2010 at 9:44 AM, Will Coleda <will at> wrote:
>> How would this PMC differ from the ResizableStringArray?
>> I'd hate to have to go out of core to get fast string manipulation.
> A rope is a binary tree of character arrays. Concatenation is constant time.
> The whole point is developing it out of core is so that the *best*
> version could be put into Parrot core. No one is expecting you to go
> out of core for fast string manipulation. It should also be noted that
> indexing is slower in Ropes than PMC's, but substring is faster. So
> Ropes really shine when you are mostly doing concatenation and
> substrings. If you need indexed access, they should not be used. They
> also take up more space then strings.

If the API is consistent, then it doesn't matter where it's developed,
and we can swap in a better/faster/smaller one at any time.

The original thread here was "string concatenation is slow". Sounds
like RSA is a good fit for that, and everything else can be done
outside of core and copied back in if we like it.

> Duke
> --
> Jonathan "Duke" Leto
> jonathan at

Will "Coke" Coleda

More information about the parrot-dev mailing list