[r6rs-discuss] Unicode issues

Ludovic Courtès ludovic.courtes at laas.fr
Wed Aug 29 11:36:02 EDT 2007


William D Clinger <will at ccs.neu.edu> writes:

> Ludovic Courtes quoting me:

>> Thanks for the link.  So for UTF-*, the O(1) amortized time for
>> `string-ref' and `string-length' would stem from the use of memoization,
>> while `string-set!' would remain O(n).
>
> Yes, but the record2 and record1 representations are
> O(1) amortized time for both, even without auxiliary
> memoization.

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}'.)

Thanks,
Ludovic.



More information about the r6rs-discuss mailing list