[r6rs-discuss] Unicode issues

From: William D Clinger <will>
Date: Wed, 29 Aug 2007 11:57:57 -0400

Ludovic Courtes wrote:
> Right, but these look more complex IMO, whereas memoization is really
> orthogonal to the implementation of the "real" `string-{ref,length}'
> (one could implement memoization and `string-set!' on top of an
> immutable string implementation with O(n) `string-{ref,length}'.)

An orthogonal memoization would perform miserably for
typical access patterns if the underlying representation
were UTF-8 or UTF-16. With those representations, you
need to memoize the mapping from character index to code
unit index. To an orthogonal memoization, that mapping
wouldn't even be visible.

Will
Received on Wed Aug 29 2007 - 11:57:57 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC