On Mon, Mar 26, 2001 at 04:34:22PM -0600, Jarkko Hietaniemi wrote:
> > Of course. So how is the ST justified when you simply want to
> > sort by length? I.e., why is this not sufficient:
>
> Those of the School of Maniacal Optimization may prefer calling
> length() only O(N) times, instead of O(N log N) times. Yeah, a weak
> argument, but then again, I didn't claim length() as such being the
> prime user of ST.
Oops. Maybe it wasn't the best example.
Ah, I think I can weasel my way out of this: now we have UTF8 strings, it's
possible that calling length() on a string is an O(N) process instead of a
simple lookup in the SV. (Hmm. Perhaps xpv should have had an xpv_utf8len
field.)
--
It's 106 miles from Birmingham, we've got an eighth of a tank of gas,
half a pack of Dorritos, it's dusk, and we're wearing contacts.
- Malcolm Ray