Tom Tromey wrote:
> I agree. This is a tricky area though, and the libgcj code is
> undergoing some discussion. For instance we discovered that the
> String(byte[]) constructor was creating too much garbage if you
> converted a large number of strings. That's because it was creating a
> new converter for each string. So now we're looking at a way to reuse
> converters (the patch isn't in yet but probably will be soon).
If you are looking into redisigning converters a bit, please take a look
at jdk 1.4 java.nio.charset package. It works on Buffers, so is not
directly usable, but it might be nice to create encoders/decoders so
they could be used later for nio.charset without big change. There is
also one idea I like there - each converter has averageBytesPerChar
float variable, which is a hint for internal allocations.
Artur
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath