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 _______________________________________________ r6rs-discuss mailing list [email protected] http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss
