RFR: JDK-8150496,(zipfs) Fix performance issues in zip-fs
Xueming Shen
xueming.shen at oracle.com
Wed May 4 19:14:00 UTC 2016
Hi Aleksey,
The webrev has been updated accordingly.
http://cr.openjdk.java.net/~sherman/8150496/webrev
---------------------------------------------------------------
*) Parentheses to nail down eval order:
if (w&& zfs.isReadOnly() || x) {
...to:
if ((w&& zfs.isReadOnly()) || x) {
--------------------------------------------------------------
updated, but just like to know if this triggers performance difference?
not likely for me though.
yes, the performance gains still hold.
Benchmark Mode Cnt Score Error Units
-------------------------------new-------------------------------------------
MyBenchmark.ZFS_Exists avgt 50 4.140 ± 0.374 ms/op
MyBenchmark.ZFS_GetPath avgt 50 12.521 ± 2.003 ms/op
MyBenchmark.ZFS_GetPathExists avgt 50 20.931 ± 1.986 ms/op
MyBenchmark.ZFS_GetPathIsDirectory avgt 50 25.531 ± 1.322 ms/op
MyBenchmark.ZFS_GetPathIsRegularFile avgt 50 26.971 ± 2.957 ms/op
MyBenchmark.ZFS_GetPathNewInputStream avgt 50 31.064 ± 1.542 ms/op
MyBenchmark.ZFS_GetPathToRealPath avgt 50 20.506 ± 0.512 ms/op
MyBenchmark.ZFS_IsDirectory avgt 50 8.935 ± 0.367 ms/op
MyBenchmark.ZFS_IsRegularFile avgt 50 8.831 ± 0.505 ms/op
MyBenchmark.ZFS_Itr avgt 50 18.981 ± 0.367 ms/op
MyBenchmark.ZFS_Open avgt 50 1340.401 ± 204.590 ms/op
MyBenchmark.ZFS_ToRealPath avgt 50 4.803 ± 0.450 ms/op
MyBenchmark.ZFS_newInputStream avgt 50 14.687 ± 0.515 ms/op
-------------------------------old-------------------------------------------
MyBenchmark.ZFS_Exists avgt 50 10.475 ± 0.438 ms/op
MyBenchmark.ZFS_GetPath avgt 50 12.199 ± 0.522 ms/op
MyBenchmark.ZFS_GetPathExists avgt 50 27.345 ± 1.886 ms/op
MyBenchmark.ZFS_GetPathIsDirectory avgt 50 29.667 ± 3.120 ms/op
MyBenchmark.ZFS_GetPathIsRegularFile avgt 50 28.810 ± 2.455 ms/op
MyBenchmark.ZFS_GetPathNewInputStream avgt 50 152.794 ± 3.628 ms/op
MyBenchmark.ZFS_GetPathToRealPath avgt 50 36.499 ± 1.331 ms/op
MyBenchmark.ZFS_IsDirectory avgt 50 10.887 ± 0.454 ms/op
MyBenchmark.ZFS_IsRegularFile avgt 50 11.276 ± 0.410 ms/op
MyBenchmark.ZFS_Itr avgt 50 21.126 ± 0.729 ms/op
MyBenchmark.ZFS_Open avgt 50 1587.028 ± 90.858 ms/op
MyBenchmark.ZFS_ToRealPath avgt 50 19.399 ± 0.613 ms/op
btw, it appears the jmh no longer "install" with the latest jdk9 repo. After I updated
the jdk9 repo, now "mvn clean install" throws exception showed below. But it runs
the benchmark fine. Maybe my jmh version is old?
xueshen at sca00aky:/export/home/xueshen/jmh/jzf/test]mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building JMH benchmark sample: Java 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ test ---
[INFO] Deleting /export/home/xueshen/jmh/jzf/test/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /export/home/xueshen/jmh/jzf/test/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ test ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /export/home/xueshen/jmh/jzf/test/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Annotation generator had thrown the exception. java.lang.NoClassDefFoundError: javax/annotation/Generated
at org.openjdk.jmh.generators.core.BenchmarkGenerator.generateImport(BenchmarkGenerator.java:575)
at org.openjdk.jmh.generators.core.BenchmarkGenerator.generateClass(BenchmarkGenerator.java:533)
at org.openjdk.jmh.generators.core.BenchmarkGenerator.generate(BenchmarkGenerator.java:94)
at org.openjdk.jmh.generators.BenchmarkProcessor.process(BenchmarkProcessor.java:58)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(jdk.compiler
....
More information about the core-libs-dev
mailing list