SingleByteDecoder can be significantly faster

XMLWordPrintable

      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).

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: