RFR: 8260617: Merge ZipFile encoding check with the initial hash calculation [v3]
redestad at openjdk.java.net
Sat Jan 30 18:30:59 UTC 2021
> - 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
Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
Clarify comments, put normal path branch first in UTF8 checkedHash
- all: https://git.openjdk.java.net/jdk/pull/2306/files
- new: https://git.openjdk.java.net/jdk/pull/2306/files/713e03b4..bb1659e3
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2306&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2306&range=01-02
Stats: 12 lines in 1 file changed: 4 ins; 5 del; 3 mod
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2306/head:pull/2306
More information about the core-libs-dev