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

SingleByteDecoder can be significantly faster

    XMLWordPrintable

    Details

      Description

      Attached test measures performance of BufferedReader.readline() and it seems that noticiable fraction of
      time is spent in sun.nio.cs.SingleByteDecoder.decodeLoop().

      Performance seems to improve significantly if SingleByteDecoder is changed to use char array for
      byteToChar table instead of String. See suggested change in attachment.

      In my experiments this change helps to improve performance of ReadlinePerf test by 35-40% -
      time drops from from ~1200ms to 740ms (tested on Windows Vista and XP).

      It also have noticeable impact on reading deployment cache. In my experiments performance
      savings are around 5-7% (reading manifests from index files by CacheEntry).

        Attachments

          Activity

            People

            • Assignee:
              sherman Xueming Shen
              Reporter:
              igor Igor Nekrestyanov (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: