On Mon, Apr 27, 2009 at 12:02:56PM +0200, Helmut Wollmersdorfer wrote:
>  It would be possible to compose character names for the life-time of
> the process, but these names would need to be checked for uniqueness
> (performance problem).
With our grapheme approach we will certainly compose unique graphemes
to be temporarily representable with single (negative) integers, so the
table of these can easily map the integer to a temporarily composed name.
Going the other direction is just a hash to integer, which should scale
O(1)ishly, albeit with a larger constant. Currently parrot plans to
implement these tables per-string rather than per-process, but the idea
is the same.
In any event, correctness before optimization applies. If we can
make graphemes work (more or less) the way users expect rather than
the way computers expect, we will have achieved a strong bit of
disruptive technology, which alone would make Perl 6 a better choice
for text processing than many other current offerings. And as
Todd Proebsting has pointed out, in order to produce a disruptive
technology, you pretty much have to plan to do something *worse*
rather than better, so I'm not so worried about the performance
at this point.