Jan Vroonhof <vroonhof(a)math.ethz.ch> writes:
I thought some operations on mule buffers become O(n^2)?
Under Mule, access to the byte position of character index n is O(n).
This means that simply iterating through characters is an O(n^2)
operation. However, insdel.c maintains a cache of recent buffer byte
positions which is supposed to remove O(n^2) for iteration.
No such caches exist for strings. Noone has measured how well the
cache actually fares.
I am not a fan limiting the integer range and I hope some other
solution can be found but if really makes implementing that much
easier I won't loose any sleep over it.
That's worse-is-better.