[Mono-list] A couple of questions...

Fergus Henderson fjh@cs.mu.oz.au
Wed, 15 Aug 2001 15:41:50 +1000


On 14-Aug-2001, A Rafael D Teixeira <rafaelteixeirabr@hotmail.com> wrote:
> In truth itīs more complex than that: the compiler/runtime should "OPTIMIZE" 
> the strings, choosing for each one what is the encoding that generates the 
> smallest representation, and then tagging it with which encoding it used.

The drawback of that approach is that string indexing becomes
O(N) in the length of the string, rather than O(1).

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.