Re: Sample Implementation?
taylanbayirli@xxxxxx 11 Jun 2016 17:19 UTC
xxxxxx@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:
> Alan Manuel Gloria <xxxxxx@gmail.com> writes:
>
>> Well, if Taylan's explanation is correct...
>
> It was quite possibly a big simplification. :-) I was just recounting
> what I gathered from previous discussion.
>
> I'm currently failing to find the discussion from which I've gathered
> that though.
>
> Taylan
Found it: http://srfi-email.schemers.org/srfi-130/msg/3780545
Here's the actual explanation, without getting filtered through my
imagination. ;-)
> ...
> It's just a matter of pre-computing an index table that maps every
> character index that's a multiple of (for example) 80 to the
> corresponding bytevector index of a UTF-8 representation. That yields
> an O(1) limit on the number of characters that need to be scanned per
> reference, with space overhead of three or four words per text object
> plus at most 10% the size of a UTF-8 representation.
> ...
Taylan