large Class.forName() patch

Dan McGuirk mcguirk at
Tue Feb 8 09:41:10 PST 2000

On Tue, 8 Feb 2000, Artur Biesiadowski wrote:
> > Also, I think that charAt() can be sped up for "regular" strings
> > that contain only ASCII chars < 127, because those can be represented in
> > a byte array.  So you have to ask what strings you're application is
> > dealing with.  That may depend on what i18n is used etc.
> Yes, it will go faster as no decoding would have to be done for every
> separate byte, but do you plan using special flag for marking such
> Strings ? 

This is probably not a bad idea.  Strings are immutable, so you only have
to set the flag once when the string is created.  You will save a lot of
time with ASCII strings (by far the most common case) by using this one
extra bit of memory and checking it when you do the charAt.  On the other
hand, you don't want the extra time taken creating strings to outweigh the

> If somebody
> implements full String/StringBuffer class using utf8 we could perform
> some real tests 

I guess you mean full String using UCS2 (2 bytes per character)?  A UTF8
implementation is what is there now.

More information about the kaffe mailing list