JDK-4455476 : (cs) character conversion performance problems
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2001-05-07
  • Updated: 2001-10-03
  • Resolved: 2001-10-03
Related Reports
Duplicate :  
Relates :  
Description
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

Comments
PUBLIC COMMENTS 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.
10-06-2004

EVALUATION Fixed by the redesign of the Charset API (4503732). See comments for measurements. -- ###@###.### 2001/10/2
10-09-0168