JDK-4615871 : RFE: optimization in EUC_JP code converter
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2001-12-19
  • Updated: 2013-11-01
  • Resolved: 2002-05-27
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.1 hopperFixed
Related Reports
Relates :  
Description
There are some room to optimize the EUC_JP code converters (Byte to Char).

  - Handle ASCII characters in convert() to avoid the convSingleByte() call overhead.

  - Look up byte1 in the order of the general priority 
    (i.e., JIS X 0208, JIS X 0201:GR, JIS X 0212)

  - Eliminate unnecessary masking with 0xff

The revised ByteToCharEUC_JP.java is in Attachment. It gives 12% better performance (CPU time) with ASCII only data and 18% better with ASCII+Kanji data with the String(byte[]) constructor.

Probably similar optimizations would be applicable to other multi-byte code converters.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: hopper FIXED IN: hopper INTEGRATED IN: hopper VERIFIED IN: hopper-rc
14-06-2004

EVALUATION The performance optimizations detailed in this bug were added in 1.4.1 b11. 4684520 (integrated for b13) also addressed a bug in the EUC-JP-LINUX decoder and coincidentally also included the equivalent performance optimization. ###@###.### 2002-05-27
27-05-2002