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

Build bundled zlib with -DUNALIGNED_OK for improved deflate performance

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8, 11, 14
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      Recently, I realized that running java with a LD_PRELOADed, self-build libz.so is slower than using the default, system provided libz.so.

      Digging deeper into the problem, I found that Linux distros like Ubuntu [1] build libz with "-DUNALIGNED_OK" (which is not the default for zlib). Building with "-DUNALIGNED_OK" gives ~6% performance enhancement for compression, so I suggest building the bundled zlib with this option.

      Notice, that this especially affects all jdks <=8 and all jdk versions on Windows where using the bundled zlib library is the default.

      [1] https://launchpadlibrarian.net/333606187/buildlog_ubuntu-artful-amd64.zlib_1%3A1.2.11.dfsg-0ubuntu2_BUILDING.txt.gz

        Attachments

          Activity

            People

            • Assignee:
              simonis Volker Simonis
              Reporter:
              simonis Volker Simonis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: