Transcoding to UCS2 Reduces Parsing Time by 60%

Vasily Chekalkin bacek at bacek.com
Tue May 26 09:40:27 UTC 2009


chromatic wrote:
> Random indexed access into variable-width encoded strings is very expensive.
> 
> (The process isn't quite sufficient to rebuild all of Rakudo, as some generated 
> files appear partially encoded in UCS-2.)

Ouch... Yet Another Not Really Good Design Decision. Why we use STRING 
for representing semantically different things "sequence of bytes" and 
"sequence of characters"? Why we spend zillions of CPU cycles to handle 
things in some "transport" format (like utf8) during runtime manipulating?

-- 
Bacek.


More information about the parrot-dev mailing list