Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5011518

getBytes performance deterioration in 1.4.2_0X, especially with MS932

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 1.4.2_02
    • core-libs

      The getBytes performance deterioration in 1.4.2_0X has been found
      comparing with that in 1.3.1_0X, especially with MS932 encoding.

      REPRODUCE :

        (1) Compile the attached program, getBytes_7f.java
        (2) Invoke 3 encoding set for performance comparison like
            "java getBytes_7f ISO-8859-1",
            "java getBytes_7f UTF-8",
             and "java getByte_7f MS932".
             Then "time : XXXX" message will show up.

      CONFIGURATION :
       OS:Windows XP(SP1, Japanese)
       CPU:Pentium4 1.4[GHz]
       MEM:384[MB]
       JRE/JDK : 1.4.2/1.5

      BEHAVIOR:
       Please see the following messages.

      ===========1.3.1_0X ============================
      K:\nio-perf\getBytes>java -version
      java version "1.3.1_09"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_09-b03)
      Java HotSpot(TM) Client VM (build 1.3.1_09-b03, mixed mode)

      K:\nio-perf\getBytes>java getByte_7f ISO-8859-1
      time : 340

      K:\nio-perf\getBytes>java getByte_7f UTF-8
      time : 370

      K:\nio-perf\getBytes>java getByte_7f MS932
      time : 460

      =========== 1.4.2_02 =================
      K:\nio-perf\getBytes>java -version
      java version "1.4.2_02"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_02-b03)
      Java HotSpot(TM) Client VM (build 1.4.2_02-b03, mixed mode)

      K:\nio-perf\getBytes>java getByte_7f ISO-8859-1
      time : 180

      K:\nio-perf\getBytes>java getByte_7f UTF-8
      time : 231

      K:\nio-perf\getBytes>java getByte_7f MS932
      time : 822
      =========== 1.5.0 Beta===============================================
      K:\nio-perf\getBytes>
      K:\nio-perf\getBytes>java -version
      java version "1.5.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b38)
      Java HotSpot(TM) Client VM (build 1.5.0-beta2-b38, mixed mode)

      K:\nio-perf\getBytes>java getByte_7f ISO-8859-1
      time : 200

      K:\nio-perf\getBytes>java getByte_7f UTF-8
      time : 250

      K:\nio-perf\getBytes>java getByte_7f MS932
      time : 581

      =======================================================================

      USERS COMMENT :
        The perf. for ISO-8859-1 or UTF-8 seems reasonable, but that for extension-
      encoding is worse.

      REQUEST :
        SUN should improve the performance of nio for extention-encoding in 1.4.2.
        It take too much time in 1.4.2 comparing with 1.3.1 in extension-encoding.
      =============================================================================

            martin Martin Buchholz
            tbaba Tadayuki Baba (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: