java-nio-charset-enhanced -- Milestone 4 is released

Ulf Zibis Ulf.Zibis at
Fri Mar 27 20:29:37 UTC 2009

Hi folks,

milestone 4 of charset enhancement is released.

- I reduced the jar-footprint, concerning entire single-byte needs, 
compared to original JDK 6 binaries, down to 7 %, which also should 
perform class loading, (not to forget: encoder maps are lazy 
initialized), even though there are added 21 specialized coder algorithms.
- In this release there is only 1 class <SingleByteCharset> for all 
single-byte charsets, which reads decoder mapping + all names including 
aliases from a small data file (69..731 Bytes, average 250 Bytes). This 
is possible, because numerous charsets can inherit their mappings (256 
2-byte chars) from each other, and empty or 1:1 ranges (especially 
\u0000..\u007F) are filled by constructor.
- Additionally a set of 7 Decoder and 14 Encoder classes do there work, 
specially speed + memory optimised for the charsets, having diverse 
character spreading and frequency of occurrence. A special MapCalculator 
class for playing with different parameters is provided in the test package.
- The aliases and historical names should no more statically and 
entirely loaded, provided and linked from StandardCharsets class. They 
additionally could be easy edited in files standard-charsets and 
extended-charsets (refer Bug Id: 6795538 
<>). If some 
day they are defined entirely upper-case, they could be omitted 
completely, as they are redundantly case-standardised existing in the 
FastCharsetProvider lookup maps. Determining the 'contains()' references 
by this way would be also reasonable (refer Bug Id: 6761481 
<>), but 
containment of ASCII is already calculated automatically.

See my projects home: --->

I believe, these techniques could also be used for most multi-byte 
charsets, especially inheriting maps to reduce entire charsets footprint.

_Outlook Milestone 5_ : Final performance optimisation by dedicated 
inlining, exception catching, surrogate handling etc..
                                  *Urgently waiting* for Christian 
Thalinger's optimization of "widening conversions".

Happy easter,


P.S.: I'm on the way, providing changesets slice by slice for OpenJDK 7.
BTW: Is there a way to add author and/or contributor annotation in the 
sources to _honour the investigation of external collaborators_ (almost 
1 year in my case)?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the core-libs-dev mailing list