karlheg(a)cathcart.sysc.pdx.edu (Karl M. Hegbloom) writes:
>>>>> "sb" == SL Baur
<steve(a)xemacs.org> writes:
sb> Or maybe no one cares and we can drop XEmacs/no-Mule entirely
sb> ...
Is Mule really that much slower than nomule, or with coding system
only? I think a lot of non-mule users would like to keep using it
without the mule support if it's faster enough to matter.
Random access to internal text representation is O(n) due to
Charcount<->Bufbyte conversions. Thus simple iteration through a
string is in fact an O(n^2) operation[1]. Buffers have a small cache
of calculated byte positions, but the caches are not very efficient,
either.
Also, Mule does wonders with its guessing and file coding code. Look
at lread.c for an example of what streams can do to you.
[1]
This is in Lisp. In C, most code has been rewritten to use
INC_CHARPTR and DEC_CHARTPR macros to avoid the slowdown. See the
Mule coding guide in the Internals manual for more details.