[r6rs-discuss] Unicode issues
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.
Received on Wed Aug 29 2007 - 11:36:02 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC