Integrated: 8260617: Merge ZipFile encoding check with the initial hash calculation

Claes Redestad redestad at openjdk.java.net
Wed Feb 3 11:45:54 UTC 2021


On Fri, 29 Jan 2021 00:54:46 GMT, Claes Redestad <redestad at openjdk.org> wrote:

> - Merge checkEncoding into the byte[]-based normalizedHash. The latter is only used from ZipFile.initCEN right after the checkEncoding today, so verifying this is equivalent is straightforward.
> - Factor out the logic to calculate hash, check encoding etc into the addEntry method to allow JITs to chew off larger chunks of the logic early on
> 
> Roughly 1.2x speedup on the JarFileMeta microbenchmarks, which include the time required to open the jar file and thus exercising the optimized code.
> 
> Testing: tier1-4

This pull request has now been integrated.

Changeset: c8de943c
Author:    Claes Redestad <redestad at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/c8de943c
Stats:     192 lines in 2 files changed: 67 ins; 83 del; 42 mod

8260617: Merge ZipFile encoding check with the initial hash calculation

Reviewed-by: lancea

-------------

PR: https://git.openjdk.java.net/jdk/pull/2306


More information about the core-libs-dev mailing list