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

Vasily Chekalkin bacek at bacek.com
Fri Apr 23 13:21:44 UTC 2010


Hello.

On Fri, Apr 23, 2010 at 9:04 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Thu, Apr 22, 2010 at 12:59:35PM -0400, Will Coleda wrote:
>> 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.
>
> RSA is a good fit only if it's also possible to quickly concatenate
> RSA's.  I'm not sure that's currently the case, although perhaps the
> splice opcode works for this.

It is. Parrot_str_join was refactored to concatenate R*A fast.

> In the case of POST::Compiler, most "concatenations" occur on CodeString
> PMCs through the .emit() method.  It's certainly okay to redesign emit()
> internally so that it maintains the string as some other structure,
> as long as when we ultimately request get_string() we get the expected
> result.  CodeStrings also currently expect to be 'isa String' -- that may
> want to be changed into 'does string' at some point, but doing so
> would likely also have a big impact on lots of existing :multi() subs.

I'll work on CodeString.emit refactoring to use RSA+join. OTOH I'm not
sure about overall
semantics of CodeString...

-- 
Bacek


More information about the parrot-dev mailing list