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

Jonathan Leto jaleto at gmail.com
Thu Apr 22 16:54:57 UTC 2010


Howdy

On Thu, Apr 22, 2010 at 9:44 AM, Will Coleda <will at coleda.com> 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.

Duke


-- 
Jonathan "Duke" Leto
jonathan at leto.net
http://leto.net


More information about the parrot-dev mailing list