It would be nice to be able to compare characters with eq?. This would remove a
constant cost per processed character from parsing, regexp matching, suffix
arrays and many other things.
Sadly this can't be done because the characters can be bignums and thus not be
eq?. This could be done if one automatically interned such code points during
string construction. This might well be a worthwhile thing to do, because one
would typically have to pay for this only at Unicode parsing phase, and most
likely typically there wouldn't be millions of high code points in active use.
On the other hand adding another store and making bytes->string depend on
threading, which might change a lot in the future, seem like bad ideas.
Better to think about this some more.
Original issue reported on code.google.com by aohelin on 27 Dec 2011 at 9:20
Original issue reported on code.google.com by
aohelin
on 27 Dec 2011 at 9:20