classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: character converter (Re: current work)


From: Artur Biesiadowski
Subject: Re: character converter (Re: current work)
Date: Mon, 25 Jun 2001 21:06:21 +0200

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]