Character conversion in String.getBytes and new String is has less overhead for some conversions, but the actual per-character conversion process is slower. In UTF-8 conversions of short strings are faster, but conversions of long strings are slower. For Cp1254 all conversions are equal or slower. The performance improvement in setting up the conversion is masking a performance regression in actual conversion.
-----
With a revised test, for all buffer sizes performance is worse in 1.4 than in 1.3. New figures appended to comments section, new test (ConverterPerfTest.java.Z) attached.
doug.felt@eng 2001-05-30
-----
With a revised test, for all buffer sizes performance is worse in 1.4 than in 1.3. New figures appended to comments section, new test (ConverterPerfTest.java.Z) attached.
doug.felt@eng 2001-05-30
- duplicates
-
JDK-4503732 (cs) Charset API redesign
- Resolved
- relates to
-
JDK-4752992 (cs) Looking up non-NIO charsets is very slow
- Resolved