Skip to content

Performance test for BZip2CompressorOutputStream#108

Closed
XenoAmess wants to merge 19 commits intoapache:masterfrom
xenoamess-fork:performance_test_for_bzip
Closed

Performance test for BZip2CompressorOutputStream#108
XenoAmess wants to merge 19 commits intoapache:masterfrom
xenoamess-fork:performance_test_for_bzip

Conversation

@XenoAmess
Copy link
Copy Markdown
Contributor

@XenoAmess XenoAmess commented Jun 4, 2020

@bodewig
So I tried to make a refine for BZip2CompressorOutputStream yesterday.
for conclusion,

  1. adding the break seems at least not letting it slower.
    so we donot need to revert that change yesterday.
  2. the codes right now is really fast.
    I mean, all of my refine tries seems no significant improvement for performance.
  3. the refine method I tried:
    3.0 class BZip2CompressorOutputStream is the class in branch master now(with break). class BZip2CompressorOutputStreamNonBreak is the version without break.
    3.1. class BZip2CompressorOutputStreamXenoAmessInShort : aims to use short instead of boolean in Data.inUse array, and use bit operations for copy/change.
    3.2. class BZip2CompressorOutputStreamXenoAmessInBoolean : aims to inline more, and added some small changes.
    3.3 class BZip2CompressorOutputStreamXenoAmessInBoolean2 : aims to inline as LEAST methods as we can, and wholly trust JIT will give it a good C2.
    and the result of performance test shows that there are nearly no difference in speed actually, and BZip2CompressorOutputStream runs slightly (very slightly) faster than others.(which means all of my refinitions failed)
    But, as all known, jmh is actually not a stable thing, so as the diffenerce are really small, I think it is the right time for me to surrender and stop trying to refine it using my tricky ways.
    And the BZip2CompressorOutputStream in master now is good. No need to revert the break. at least on win10, jdk13.
    Althought the refining-try failed, maybe the performance test codes and the "refined"(or, variant actually, as they does not refine anything) classes might be useful.
    I just put them in the test folder, and maybe next time when some guy wanna refine this class, they can at least know in what ways I failed and stop waste time on it.

@XenoAmess XenoAmess closed this Jun 4, 2020
XenoAmess added 2 commits June 4, 2020 22:09
and revert changes about BZip2CompressorOutputStream back to master
@XenoAmess XenoAmess reopened this Jun 4, 2020
@XenoAmess
Copy link
Copy Markdown
Contributor Author

XenoAmess commented Jun 4, 2020

result:

[INFO] --- exec-maven-plugin:1.6.0:exec (benchmark) @ commons-compress ---
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.openjdk.jmh.util.Utils (file:/C:/Users/xenoa/.m2/repository/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21.jar) to field
 java.io.PrintStream.charOut
WARNING: Please consider reporting this to the maintainers of org.openjdk.jmh.util.Utils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
# JMH version: 1.21
# VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
# VM invoker: C:\jdk-13.0.2+8\bin\java.exe
# VM options: <none>
# Warmup: 5 iterations, 1000 ms each
# Measurement: 5 iterations, 1000 ms each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOld

# Run progress: 0.00% complete, ETA 00:08:20
# Fork: 1 of 5
# Warmup Iteration   1: 1610496.308 ns/op
# Warmup Iteration   2: 1285739.923 ns/op
# Warmup Iteration   3: 1319075.659 ns/op
# Warmup Iteration   4: 1206658.054 ns/op
# Warmup Iteration   5: 1212034.825 ns/op
Iteration   1: 1177021.620 ns/op
Iteration   2: 1127303.711 ns/op
Iteration   3: 1258797.742 ns/op
Iteration   4: 1315991.207 ns/op
Iteration   5: 1205418.412 ns/op

# Run progress: 2.00% complete, ETA 00:08:39
# Fork: 2 of 5
# Warmup Iteration   1: 2294073.057 ns/op
# Warmup Iteration   2: 1375517.170 ns/op
# Warmup Iteration   3: 1239546.963 ns/op
# Warmup Iteration   4: 1351977.974 ns/op
# Warmup Iteration   5: 1134073.159 ns/op
Iteration   1: 1117403.007 ns/op
Iteration   2: 1120983.111 ns/op
Iteration   3: 1206172.892 ns/op
Iteration   4: 1235757.284 ns/op
Iteration   5: 1288148.267 ns/op

# Run progress: 4.00% complete, ETA 00:08:27
# Fork: 3 of 5
# Warmup Iteration   1: 1693162.961 ns/op
# Warmup Iteration   2: 1167198.016 ns/op
# Warmup Iteration   3: 1133606.893 ns/op
# Warmup Iteration   4: 1161932.098 ns/op
# Warmup Iteration   5: 1535876.687 ns/op
Iteration   1: 1345864.651 ns/op
Iteration   2: 1249905.610 ns/op
Iteration   3: 1229342.455 ns/op
Iteration   4: 1174833.647 ns/op
Iteration   5: 1373930.233 ns/op

# Run progress: 6.00% complete, ETA 00:08:16
# Fork: 4 of 5
# Warmup Iteration   1: 1879272.472 ns/op
# Warmup Iteration   2: 1162737.631 ns/op
# Warmup Iteration   3: 1181587.721 ns/op
# Warmup Iteration   4: 1188449.348 ns/op
# Warmup Iteration   5: 1269665.100 ns/op
Iteration   1: 1407715.309 ns/op
Iteration   2: 1319910.290 ns/op
Iteration   3: 1196952.992 ns/op
Iteration   4: 1191689.535 ns/op
Iteration   5: 1191617.359 ns/op

# Run progress: 8.00% complete, ETA 00:08:08
# Fork: 5 of 5
# Warmup Iteration   1: 1853807.299 ns/op
# Warmup Iteration   2: 1315560.938 ns/op
# Warmup Iteration   3: 1199441.746 ns/op
# Warmup Iteration   4: 1204869.112 ns/op
# Warmup Iteration   5: 1175004.338 ns/op
Iteration   1: 1161137.935 ns/op
Iteration   2: 1247206.335 ns/op
Iteration   3: 1329505.976 ns/op
Iteration   4: 1134020.725 ns/op
Iteration   5: 1188067.340 ns/op


Result "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOld":
  1231787.906 ?99.9%) 60747.130 ns/op [Average]

  (min, avg, max) = (1117403.007, 1231787.906, 1407715.309), stdev = 81095.680
  CI (99.9%): [1171040.776, 1292535.035] (assumes normal distribution)


# JMH version: 1.21
# VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
# VM invoker: C:\jdk-13.0.2+8\bin\java.exe
# VM options: <none>
# Warmup: 5 iterations, 1000 ms each
# Measurement: 5 iterations, 1000 ms each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOldWithNonBreak

# Run progress: 10.00% complete, ETA 00:07:57
# Fork: 1 of 5
# Warmup Iteration   1: 1599017.358 ns/op
# Warmup Iteration   2: 1217280.802 ns/op
# Warmup Iteration   3: 1371714.522 ns/op
# Warmup Iteration   4: 1198214.593 ns/op
# Warmup Iteration   5: 1242029.988 ns/op
Iteration   1: 1219577.616 ns/op
Iteration   2: 1217867.518 ns/op
Iteration   3: 1239696.653 ns/op
Iteration   4: 1345318.792 ns/op
Iteration   5: 1188941.568 ns/op

# Run progress: 12.00% complete, ETA 00:07:46
# Fork: 2 of 5
# Warmup Iteration   1: 1609769.071 ns/op
# Warmup Iteration   2: 1175984.371 ns/op
# Warmup Iteration   3: 1182322.813 ns/op
# Warmup Iteration   4: 1285766.324 ns/op
# Warmup Iteration   5: 1396825.243 ns/op
Iteration   1: 1220320.245 ns/op
Iteration   2: 1178962.191 ns/op
Iteration   3: 1150802.067 ns/op
Iteration   4: 1189386.951 ns/op
Iteration   5: 1259764.528 ns/op

# Run progress: 14.00% complete, ETA 00:07:36
# Fork: 3 of 5
# Warmup Iteration   1: 1629304.700 ns/op
# Warmup Iteration   2: 1164573.403 ns/op
# Warmup Iteration   3: 1211949.093 ns/op
# Warmup Iteration   4: 1181045.046 ns/op
# Warmup Iteration   5: 1593931.846 ns/op
Iteration   1: 1319811.461 ns/op
Iteration   2: 1242681.390 ns/op
Iteration   3: 1281534.955 ns/op
Iteration   4: 1190924.375 ns/op
Iteration   5: 1253228.964 ns/op

# Run progress: 16.00% complete, ETA 00:07:25
# Fork: 4 of 5
# Warmup Iteration   1: 1855448.799 ns/op
# Warmup Iteration   2: 1233080.320 ns/op
# Warmup Iteration   3: 1215955.879 ns/op
# Warmup Iteration   4: 1189972.922 ns/op
# Warmup Iteration   5: 1215854.193 ns/op
Iteration   1: 1235037.654 ns/op
Iteration   2: 1207377.377 ns/op
Iteration   3: 1169074.765 ns/op
Iteration   4: 1166782.284 ns/op
Iteration   5: 1138645.455 ns/op

# Run progress: 18.00% complete, ETA 00:07:15
# Fork: 5 of 5
# Warmup Iteration   1: 1683548.826 ns/op
# Warmup Iteration   2: 1357139.295 ns/op
# Warmup Iteration   3: 1157834.722 ns/op
# Warmup Iteration   4: 1221721.194 ns/op
# Warmup Iteration   5: 1196720.789 ns/op
Iteration   1: 1201098.441 ns/op
Iteration   2: 1236322.207 ns/op
Iteration   3: 1447036.638 ns/op
Iteration   4: 1277316.011 ns/op
Iteration   5: 1227483.313 ns/op


Result "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOldWithNonBreak":
  1232199.737 ?99.9%) 49896.118 ns/op [Average]

  (min, avg, max) = (1138645.455, 1232199.737, 1447036.638), stdev = 66609.890
  CI (99.9%): [1182303.619, 1282095.854] (assumes normal distribution)


# JMH version: 1.21
# VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
# VM invoker: C:\jdk-13.0.2+8\bin\java.exe
# VM options: <none>
# Warmup: 5 iterations, 1000 ms each
# Measurement: 5 iterations, 1000 ms each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOldWithNonBreak_large

# Run progress: 20.00% complete, ETA 00:07:04
# Fork: 1 of 5
# Warmup Iteration   1: 2333590300.000 ns/op
# Warmup Iteration   2: 2084447901.000 ns/op
# Warmup Iteration   3: 2078082100.000 ns/op
# Warmup Iteration   4: 2147598600.000 ns/op
# Warmup Iteration   5: 2025607700.000 ns/op
Iteration   1: 1926825600.000 ns/op
Iteration   2: 2043991299.000 ns/op
Iteration   3: 1953332401.000 ns/op
Iteration   4: 1931591201.000 ns/op
Iteration   5: 2011371800.000 ns/op

# Run progress: 22.00% complete, ETA 00:07:30
# Fork: 2 of 5
# Warmup Iteration   1: 2339150500.000 ns/op
# Warmup Iteration   2: 1829855700.000 ns/op
# Warmup Iteration   3: 1924101699.000 ns/op
# Warmup Iteration   4: 1824666400.000 ns/op
# Warmup Iteration   5: 1815241499.000 ns/op
Iteration   1: 2087423201.000 ns/op
Iteration   2: 1900431000.000 ns/op
Iteration   3: 1762311301.000 ns/op
Iteration   4: 1972261300.000 ns/op
Iteration   5: 1907756499.000 ns/op

# Run progress: 24.00% complete, ETA 00:07:45
# Fork: 3 of 5
# Warmup Iteration   1: 2474232501.000 ns/op
# Warmup Iteration   2: 1827107101.000 ns/op
# Warmup Iteration   3: 1823409699.000 ns/op
# Warmup Iteration   4: 1887881700.000 ns/op
# Warmup Iteration   5: 1886201000.000 ns/op
Iteration   1: 1846151200.000 ns/op
Iteration   2: 1892023000.000 ns/op
Iteration   3: 1714751701.000 ns/op
Iteration   4: 1834355999.000 ns/op
Iteration   5: 1954406100.000 ns/op

# Run progress: 26.00% complete, ETA 00:07:54
# Fork: 4 of 5
# Warmup Iteration   1: 2650675099.000 ns/op
# Warmup Iteration   2: 2409625901.000 ns/op
# Warmup Iteration   3: 2336825699.000 ns/op
# Warmup Iteration   4: 2272169300.000 ns/op
# Warmup Iteration   5: 2466653700.000 ns/op
Iteration   1: 2292780701.000 ns/op
Iteration   2: 2338305200.000 ns/op
Iteration   3: 2293059001.000 ns/op
Iteration   4: 2314622700.000 ns/op
Iteration   5: 2455921900.000 ns/op

# Run progress: 28.00% complete, ETA 00:08:11
# Fork: 5 of 5
# Warmup Iteration   1: 2553779001.000 ns/op
# Warmup Iteration   2: 2401641301.000 ns/op
# Warmup Iteration   3: 2248834301.000 ns/op
# Warmup Iteration   4: 2444841100.000 ns/op
# Warmup Iteration   5: 2365409600.000 ns/op
Iteration   1: 2295272500.000 ns/op
Iteration   2: 2400574801.000 ns/op
Iteration   3: 2271997099.000 ns/op
Iteration   4: 2414589199.000 ns/op
Iteration   5: 3189218899.000 ns/op


Result "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOldWithNonBreak_large":
  2120213024.080 ?99.9%) 236049332.413 ns/op [Average]

  (min, avg, max) = (1714751701.000, 2120213024.080, 3189218899.000), stdev = 315119105.344
  CI (99.9%): [1884163691.667, 2356262356.493] (assumes normal distribution)


# JMH version: 1.21
# VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
# VM invoker: C:\jdk-13.0.2+8\bin\java.exe
# VM options: <none>
# Warmup: 5 iterations, 1000 ms each
# Measurement: 5 iterations, 1000 ms each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOld_large

# Run progress: 30.00% complete, ETA 00:08:24
# Fork: 1 of 5
# Warmup Iteration   1: 2946264299.000 ns/op
# Warmup Iteration   2: 2112236600.000 ns/op
# Warmup Iteration   3: 2190801900.000 ns/op
# Warmup Iteration   4: 2176834799.000 ns/op
# Warmup Iteration   5: 2172301999.000 ns/op
Iteration   1: 2101698100.000 ns/op
Iteration   2: 2064272600.000 ns/op
Iteration   3: 2187237500.000 ns/op
Iteration   4: 2121889301.000 ns/op
Iteration   5: 2030750100.000 ns/op

# Run progress: 32.00% complete, ETA 00:08:28
# Fork: 2 of 5
# Warmup Iteration   1: 2408339000.000 ns/op
# Warmup Iteration   2: 1912931400.000 ns/op
# Warmup Iteration   3: 2048931901.000 ns/op
# Warmup Iteration   4: 1915860700.000 ns/op
# Warmup Iteration   5: 1912029900.000 ns/op
Iteration   1: 1955578901.000 ns/op
Iteration   2: 1817762300.000 ns/op
Iteration   3: 1831776900.000 ns/op
Iteration   4: 1874995699.000 ns/op
Iteration   5: 1838227700.000 ns/op

# Run progress: 34.00% complete, ETA 00:08:23
# Fork: 3 of 5
# Warmup Iteration   1: 2884398299.000 ns/op
# Warmup Iteration   2: 2368771400.000 ns/op
# Warmup Iteration   3: 2289749500.000 ns/op
# Warmup Iteration   4: 2497733200.000 ns/op
# Warmup Iteration   5: 2245715200.000 ns/op
Iteration   1: 2474493000.000 ns/op
Iteration   2: 2359772400.000 ns/op
Iteration   3: 2245818800.000 ns/op
Iteration   4: 2430009800.000 ns/op
Iteration   5: 2193804199.000 ns/op

# Run progress: 36.00% complete, ETA 00:08:24
# Fork: 4 of 5
# Warmup Iteration   1: 2682567400.000 ns/op
# Warmup Iteration   2: 1871899200.000 ns/op
# Warmup Iteration   3: 1801474600.000 ns/op
# Warmup Iteration   4: 1978390400.000 ns/op
# Warmup Iteration   5: 1820568299.000 ns/op
Iteration   1: 1790816400.000 ns/op
Iteration   2: 1920142699.000 ns/op
Iteration   3: 1750905001.000 ns/op
Iteration   4: 1725660700.000 ns/op
Iteration   5: 1918628999.000 ns/op

# Run progress: 38.00% complete, ETA 00:08:15
# Fork: 5 of 5
# Warmup Iteration   1: 2709824700.000 ns/op
# Warmup Iteration   2: 2286744299.000 ns/op
# Warmup Iteration   3: 2070069900.000 ns/op
# Warmup Iteration   4: 1963761801.000 ns/op
# Warmup Iteration   5: 2203276900.000 ns/op
Iteration   1: 2067757800.000 ns/op
Iteration   2: 2003415199.000 ns/op
Iteration   3: 2274397100.000 ns/op
Iteration   4: 1944810700.000 ns/op
Iteration   5: 2115635999.000 ns/op


Result "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOld_large":
  2041610315.880 ?99.9%) 157067529.099 ns/op [Average]

  (min, avg, max) = (1725660700.000, 2041610315.880, 2474493000.000), stdev = 209680657.608
  CI (99.9%): [1884542786.781, 2198677844.979] (assumes normal distribution)


# JMH version: 1.21
# VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
# VM invoker: C:\jdk-13.0.2+8\bin\java.exe
# VM options: <none>
# Warmup: 5 iterations, 1000 ms each
# Measurement: 5 iterations, 1000 ms each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean

# Run progress: 40.00% complete, ETA 00:08:08
# Fork: 1 of 5
# Warmup Iteration   1: 1772396.298 ns/op
# Warmup Iteration   2: 1193370.442 ns/op
# Warmup Iteration   3: 1174934.859 ns/op
# Warmup Iteration   4: 1273016.539 ns/op
# Warmup Iteration   5: 1467989.458 ns/op
Iteration   1: 1300187.143 ns/op
Iteration   2: 1198462.994 ns/op
Iteration   3: 1185104.858 ns/op
Iteration   4: 1171811.345 ns/op
Iteration   5: 1251268.250 ns/op

# Run progress: 42.00% complete, ETA 00:07:44
# Fork: 2 of 5
# Warmup Iteration   1: 1967990.411 ns/op
# Warmup Iteration   2: 1197252.751 ns/op
# Warmup Iteration   3: 1180123.910 ns/op
# Warmup Iteration   4: 1189293.713 ns/op
# Warmup Iteration   5: 1262702.393 ns/op
Iteration   1: 1180054.515 ns/op
Iteration   2: 1433135.521 ns/op
Iteration   3: 1258284.170 ns/op
Iteration   4: 1189417.479 ns/op
Iteration   5: 1263270.996 ns/op

# Run progress: 44.00% complete, ETA 00:07:21
# Fork: 3 of 5
# Warmup Iteration   1: 1522837.026 ns/op
# Warmup Iteration   2: 1316703.418 ns/op
# Warmup Iteration   3: 1266550.254 ns/op
# Warmup Iteration   4: 1171614.737 ns/op
# Warmup Iteration   5: 1120138.102 ns/op
Iteration   1: 1188949.645 ns/op
Iteration   2: 1137079.819 ns/op
Iteration   3: 1245094.170 ns/op
Iteration   4: 1223564.470 ns/op
Iteration   5: 1116264.698 ns/op

# Run progress: 46.00% complete, ETA 00:06:59
# Fork: 4 of 5
# Warmup Iteration   1: 1536581.344 ns/op
# Warmup Iteration   2: 1172454.673 ns/op
# Warmup Iteration   3: 1159742.839 ns/op
# Warmup Iteration   4: 1368680.792 ns/op
# Warmup Iteration   5: 1171021.145 ns/op
Iteration   1: 1194806.683 ns/op
Iteration   2: 1223727.017 ns/op
Iteration   3: 1168115.637 ns/op
Iteration   4: 1262649.685 ns/op
Iteration   5: 1371008.630 ns/op

# Run progress: 48.00% complete, ETA 00:06:38
# Fork: 5 of 5
# Warmup Iteration   1: 1592762.540 ns/op
# Warmup Iteration   2: 1205778.846 ns/op
# Warmup Iteration   3: 1187654.857 ns/op
# Warmup Iteration   4: 1177989.659 ns/op
# Warmup Iteration   5: 1502384.835 ns/op
Iteration   1: 1283710.883 ns/op
Iteration   2: 1213653.511 ns/op
Iteration   3: 1195208.602 ns/op
Iteration   4: 1337753.209 ns/op
Iteration   5: 1576530.502 ns/op


Result "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean":
  1246764.577 ?99.9%) 74547.986 ns/op [Average]

  (min, avg, max) = (1116264.698, 1246764.577, 1576530.502), stdev = 99519.429
  CI (99.9%): [1172216.591, 1321312.563] (assumes normal distribution)


# JMH version: 1.21
# VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
# VM invoker: C:\jdk-13.0.2+8\bin\java.exe
# VM options: <none>
# Warmup: 5 iterations, 1000 ms each
# Measurement: 5 iterations, 1000 ms each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean2

# Run progress: 50.00% complete, ETA 00:06:18
# Fork: 1 of 5
# Warmup Iteration   1: 1896982.420 ns/op
# Warmup Iteration   2: 1257511.935 ns/op
# Warmup Iteration   3: 1174872.299 ns/op
# Warmup Iteration   4: 1195320.501 ns/op
# Warmup Iteration   5: 1267317.826 ns/op
Iteration   1: 1285297.945 ns/op
Iteration   2: 1413173.059 ns/op
Iteration   3: 1277114.157 ns/op
Iteration   4: 1296659.302 ns/op
Iteration   5: 1206067.590 ns/op

# Run progress: 52.00% complete, ETA 00:05:59
# Fork: 2 of 5
# Warmup Iteration   1: 1605176.640 ns/op
# Warmup Iteration   2: 1313602.360 ns/op
# Warmup Iteration   3: 1215712.971 ns/op
# Warmup Iteration   4: 1156713.856 ns/op
# Warmup Iteration   5: 1304544.589 ns/op
Iteration   1: 1232945.510 ns/op
Iteration   2: 1227347.748 ns/op
Iteration   3: 1349307.412 ns/op
Iteration   4: 1311445.216 ns/op
Iteration   5: 1294939.305 ns/op

# Run progress: 54.00% complete, ETA 00:05:40
# Fork: 3 of 5
# Warmup Iteration   1: 1633211.852 ns/op
# Warmup Iteration   2: 1169685.414 ns/op
# Warmup Iteration   3: 1264599.494 ns/op
# Warmup Iteration   4: 1340580.214 ns/op
# Warmup Iteration   5: 1283006.665 ns/op
Iteration   1: 1246975.000 ns/op
Iteration   2: 1260959.950 ns/op
Iteration   3: 1363623.568 ns/op
Iteration   4: 1300410.506 ns/op
Iteration   5: 1381948.623 ns/op

# Run progress: 56.00% complete, ETA 00:05:22
# Fork: 4 of 5
# Warmup Iteration   1: 1790409.804 ns/op
# Warmup Iteration   2: 1179307.528 ns/op
# Warmup Iteration   3: 1170389.499 ns/op
# Warmup Iteration   4: 1204261.779 ns/op
# Warmup Iteration   5: 1292604.517 ns/op
Iteration   1: 1187751.958 ns/op
Iteration   2: 1192419.595 ns/op
Iteration   3: 1187167.142 ns/op
Iteration   4: 1542081.818 ns/op
Iteration   5: 1386742.600 ns/op

# Run progress: 58.00% complete, ETA 00:05:04
# Fork: 5 of 5
# Warmup Iteration   1: 1943649.130 ns/op
# Warmup Iteration   2: 1232823.767 ns/op
# Warmup Iteration   3: 1242257.939 ns/op
# Warmup Iteration   4: 1422855.023 ns/op
# Warmup Iteration   5: 1369542.623 ns/op
Iteration   1: 1356159.348 ns/op
Iteration   2: 1555641.770 ns/op
Iteration   3: 1268342.967 ns/op
Iteration   4: 1294347.416 ns/op
Iteration   5: 1252585.856 ns/op


Result "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean2":
  1306858.215 ?99.9%) 72285.499 ns/op [Average]

  (min, avg, max) = (1187167.142, 1306858.215, 1555641.770), stdev = 96499.073
  CI (99.9%): [1234572.716, 1379143.713] (assumes normal distribution)


# JMH version: 1.21
# VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
# VM invoker: C:\jdk-13.0.2+8\bin\java.exe
# VM options: <none>
# Warmup: 5 iterations, 1000 ms each
# Measurement: 5 iterations, 1000 ms each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean2_large

# Run progress: 60.00% complete, ETA 00:04:47
# Fork: 1 of 5
# Warmup Iteration   1: 2813836500.000 ns/op
# Warmup Iteration   2: 2390651700.000 ns/op
# Warmup Iteration   3: 2740632800.000 ns/op
# Warmup Iteration   4: 2269470799.000 ns/op
# Warmup Iteration   5: 2328544300.000 ns/op
Iteration   1: 2409602399.000 ns/op
Iteration   2: 2206840600.000 ns/op
Iteration   3: 2412433101.000 ns/op
Iteration   4: 2185570900.000 ns/op
Iteration   5: 2222732500.000 ns/op

# Run progress: 62.00% complete, ETA 00:04:39
# Fork: 2 of 5
# Warmup Iteration   1: 2274120299.000 ns/op
# Warmup Iteration   2: 1909828600.000 ns/op
# Warmup Iteration   3: 1896994900.000 ns/op
# Warmup Iteration   4: 1815323199.000 ns/op
# Warmup Iteration   5: 1844837700.000 ns/op
Iteration   1: 1911594800.000 ns/op
Iteration   2: 1752424600.000 ns/op
Iteration   3: 1778084600.000 ns/op
Iteration   4: 1925186500.000 ns/op
Iteration   5: 1788871201.000 ns/op

# Run progress: 64.00% complete, ETA 00:04:27
# Fork: 3 of 5
# Warmup Iteration   1: 2699624700.000 ns/op
# Warmup Iteration   2: 2159912400.000 ns/op
# Warmup Iteration   3: 2166980600.000 ns/op
# Warmup Iteration   4: 2164865600.000 ns/op
# Warmup Iteration   5: 2087956400.000 ns/op
Iteration   1: 2088532799.000 ns/op
Iteration   2: 2218460600.000 ns/op
Iteration   3: 2072051300.000 ns/op
Iteration   4: 2208279999.000 ns/op
Iteration   5: 2177528600.000 ns/op

# Run progress: 66.00% complete, ETA 00:04:16
# Fork: 4 of 5
# Warmup Iteration   1: 2826379901.000 ns/op
# Warmup Iteration   2: 2134053399.000 ns/op
# Warmup Iteration   3: 2111572799.000 ns/op
# Warmup Iteration   4: 2208191000.000 ns/op
# Warmup Iteration   5: 2111808800.000 ns/op
Iteration   1: 2089658800.000 ns/op
Iteration   2: 2099164800.000 ns/op
Iteration   3: 2115954899.000 ns/op
Iteration   4: 2147097601.000 ns/op
Iteration   5: 2214010500.000 ns/op

# Run progress: 68.00% complete, ETA 00:04:05
# Fork: 5 of 5
# Warmup Iteration   1: 2565847800.000 ns/op
# Warmup Iteration   2: 2359270599.000 ns/op
# Warmup Iteration   3: 2235585900.000 ns/op
# Warmup Iteration   4: 2409137100.000 ns/op
# Warmup Iteration   5: 2308044799.000 ns/op
Iteration   1: 2247852901.000 ns/op
Iteration   2: 2323376100.000 ns/op
Iteration   3: 2258215200.000 ns/op
Iteration   4: 2433456301.000 ns/op
Iteration   5: 2338307500.000 ns/op


Result "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean2_large":
  2145011564.040 ?99.9%) 143188713.146 ns/op [Average]

  (min, avg, max) = (1752424600.000, 2145011564.040, 2433456301.000), stdev = 191152835.386
  CI (99.9%): [2001822850.894, 2288200277.186] (assumes normal distribution)


# JMH version: 1.21
# VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
# VM invoker: C:\jdk-13.0.2+8\bin\java.exe
# VM options: <none>
# Warmup: 5 iterations, 1000 ms each
# Measurement: 5 iterations, 1000 ms each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean_large

# Run progress: 70.00% complete, ETA 00:03:53
# Fork: 1 of 5
# Warmup Iteration   1: 2605062500.000 ns/op
# Warmup Iteration   2: 2328991800.000 ns/op
# Warmup Iteration   3: 2296030700.000 ns/op
# Warmup Iteration   4: 2222140199.000 ns/op
# Warmup Iteration   5: 2094271500.000 ns/op
Iteration   1: 2229431200.000 ns/op
Iteration   2: 2135638300.000 ns/op
Iteration   3: 2064529599.000 ns/op
Iteration   4: 2193901600.000 ns/op
Iteration   5: 2181651701.000 ns/op

# Run progress: 72.00% complete, ETA 00:03:40
# Fork: 2 of 5
# Warmup Iteration   1: 2522995300.000 ns/op
# Warmup Iteration   2: 1857874501.000 ns/op
# Warmup Iteration   3: 1757635000.000 ns/op
# Warmup Iteration   4: 1897080501.000 ns/op
# Warmup Iteration   5: 1811992400.000 ns/op
Iteration   1: 1855157700.000 ns/op
Iteration   2: 1799468900.000 ns/op
Iteration   3: 1775201799.000 ns/op
Iteration   4: 1708821300.000 ns/op
Iteration   5: 1873958100.000 ns/op

# Run progress: 74.00% complete, ETA 00:03:26
# Fork: 3 of 5
# Warmup Iteration   1: 3019203000.000 ns/op
# Warmup Iteration   2: 2486438201.000 ns/op
# Warmup Iteration   3: 2318496100.000 ns/op
# Warmup Iteration   4: 2370342100.000 ns/op
# Warmup Iteration   5: 2447265299.000 ns/op
Iteration   1: 2260157300.000 ns/op
Iteration   2: 2462295900.000 ns/op
Iteration   3: 2307637400.000 ns/op
Iteration   4: 2413787200.000 ns/op
Iteration   5: 2426938401.000 ns/op

# Run progress: 76.00% complete, ETA 00:03:13
# Fork: 4 of 5
# Warmup Iteration   1: 3022233901.000 ns/op
# Warmup Iteration   2: 2332305100.000 ns/op
# Warmup Iteration   3: 2216467899.000 ns/op
# Warmup Iteration   4: 2482082200.000 ns/op
# Warmup Iteration   5: 2474061900.000 ns/op
Iteration   1: 2516424100.000 ns/op
Iteration   2: 2239128600.000 ns/op
Iteration   3: 2255470101.000 ns/op
Iteration   4: 2397133601.000 ns/op
Iteration   5: 2161965600.000 ns/op

# Run progress: 78.00% complete, ETA 00:02:59
# Fork: 5 of 5
# Warmup Iteration   1: 2505073399.000 ns/op
# Warmup Iteration   2: 1828002900.000 ns/op
# Warmup Iteration   3: 1752670200.000 ns/op
# Warmup Iteration   4: 2189374799.000 ns/op
# Warmup Iteration   5: 1857296700.000 ns/op
Iteration   1: 1865237301.000 ns/op
Iteration   2: 1936701700.000 ns/op
Iteration   3: 1754637300.000 ns/op
Iteration   4: 1866867500.000 ns/op
Iteration   5: 1984557200.000 ns/op


Result "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean_large":
  2106667976.120 ?99.9%) 185809834.024 ns/op [Average]

  (min, avg, max) = (1708821300.000, 2106667976.120, 2516424100.000), stdev = 248050812.358
  CI (99.9%): [1920858142.096, 2292477810.144] (assumes normal distribution)


# JMH version: 1.21
# VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
# VM invoker: C:\jdk-13.0.2+8\bin\java.exe
# VM options: <none>
# Warmup: 5 iterations, 1000 ms each
# Measurement: 5 iterations, 1000 ms each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessShort

# Run progress: 80.00% complete, ETA 00:02:44
# Fork: 1 of 5
# Warmup Iteration   1: 1557119.380 ns/op
# Warmup Iteration   2: 1169396.612 ns/op
# Warmup Iteration   3: 1192752.738 ns/op
# Warmup Iteration   4: 1361681.522 ns/op
# Warmup Iteration   5: 1251473.533 ns/op
Iteration   1: 1170425.467 ns/op
Iteration   2: 1179550.236 ns/op
Iteration   3: 1140608.209 ns/op
Iteration   4: 1109964.303 ns/op
Iteration   5: 1350190.420 ns/op

# Run progress: 82.00% complete, ETA 00:02:26
# Fork: 2 of 5
# Warmup Iteration   1: 1659987.107 ns/op
# Warmup Iteration   2: 1169791.725 ns/op
# Warmup Iteration   3: 1208455.730 ns/op
# Warmup Iteration   4: 1180016.961 ns/op
# Warmup Iteration   5: 1266305.436 ns/op
Iteration   1: 1260401.509 ns/op
Iteration   2: 1196957.637 ns/op
Iteration   3: 1128279.640 ns/op
Iteration   4: 1159284.125 ns/op
Iteration   5: 1191038.050 ns/op

# Run progress: 84.00% complete, ETA 00:02:09
# Fork: 3 of 5
# Warmup Iteration   1: 2035897.769 ns/op
# Warmup Iteration   2: 1124006.404 ns/op
# Warmup Iteration   3: 1168239.510 ns/op
# Warmup Iteration   4: 1215152.365 ns/op
# Warmup Iteration   5: 1266289.773 ns/op
Iteration   1: 1248003.493 ns/op
Iteration   2: 1446068.580 ns/op
Iteration   3: 1291581.421 ns/op
Iteration   4: 1289232.304 ns/op
Iteration   5: 1350836.253 ns/op

# Run progress: 86.00% complete, ETA 00:01:52
# Fork: 4 of 5
# Warmup Iteration   1: 1511803.012 ns/op
# Warmup Iteration   2: 1258505.019 ns/op
# Warmup Iteration   3: 1276648.852 ns/op
# Warmup Iteration   4: 1164539.257 ns/op
# Warmup Iteration   5: 1607423.518 ns/op
Iteration   1: 1896727.977 ns/op
Iteration   2: 1740731.597 ns/op
Iteration   3: 1387759.059 ns/op
Iteration   4: 1315878.375 ns/op
Iteration   5: 1188316.250 ns/op

# Run progress: 88.00% complete, ETA 00:01:35
# Fork: 5 of 5
# Warmup Iteration   1: 1553139.260 ns/op
# Warmup Iteration   2: 1192329.082 ns/op
# Warmup Iteration   3: 1164957.161 ns/op
# Warmup Iteration   4: 1455365.459 ns/op
# Warmup Iteration   5: 1258319.573 ns/op
Iteration   1: 1220996.346 ns/op
Iteration   2: 1264384.509 ns/op
Iteration   3: 1249577.154 ns/op
Iteration   4: 1238748.020 ns/op
Iteration   5: 1412043.159 ns/op


Result "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessShort":
  1297103.364 ?99.9%) 136111.284 ns/op [Average]

  (min, avg, max) = (1109964.303, 1297103.364, 1896727.977), stdev = 181704.670
  CI (99.9%): [1160992.080, 1433214.647] (assumes normal distribution)


# JMH version: 1.21
# VM version: JDK 13.0.2, OpenJDK 64-Bit Server VM, 13.0.2+8
# VM invoker: C:\jdk-13.0.2+8\bin\java.exe
# VM options: <none>
# Warmup: 5 iterations, 1000 ms each
# Measurement: 5 iterations, 1000 ms each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessShort_large

# Run progress: 90.00% complete, ETA 00:01:18
# Fork: 1 of 5
# Warmup Iteration   1: 2258223799.000 ns/op
# Warmup Iteration   2: 2001885601.000 ns/op
# Warmup Iteration   3: 2196559400.000 ns/op
# Warmup Iteration   4: 1962464800.000 ns/op
# Warmup Iteration   5: 2084456799.000 ns/op
Iteration   1: 2129915500.000 ns/op
Iteration   2: 1927480199.000 ns/op
Iteration   3: 2113767200.000 ns/op
Iteration   4: 1986681100.000 ns/op
Iteration   5: 2026124800.000 ns/op

# Run progress: 92.00% complete, ETA 00:01:03
# Fork: 2 of 5
# Warmup Iteration   1: 2847062400.000 ns/op
# Warmup Iteration   2: 2063437200.000 ns/op
# Warmup Iteration   3: 2590273300.000 ns/op
# Warmup Iteration   4: 2134656600.000 ns/op
# Warmup Iteration   5: 2175085400.000 ns/op
Iteration   1: 2318949200.000 ns/op
Iteration   2: 2073462100.000 ns/op
Iteration   3: 2603713101.000 ns/op
Iteration   4: 2074320100.000 ns/op
Iteration   5: 2074657599.000 ns/op

# Run progress: 94.00% complete, ETA 00:00:48
# Fork: 3 of 5
# Warmup Iteration   1: 2646467800.000 ns/op
# Warmup Iteration   2: 1844378799.000 ns/op
# Warmup Iteration   3: 2012664000.000 ns/op
# Warmup Iteration   4: 1885026800.000 ns/op
# Warmup Iteration   5: 1744897000.000 ns/op
Iteration   1: 1866583099.000 ns/op
Iteration   2: 2057854300.000 ns/op
Iteration   3: 2216846501.000 ns/op
Iteration   4: 2297094700.000 ns/op
Iteration   5: 1845934300.000 ns/op

# Run progress: 96.00% complete, ETA 00:00:32
# Fork: 4 of 5
# Warmup Iteration   1: 2375968999.000 ns/op
# Warmup Iteration   2: 2617018500.000 ns/op
# Warmup Iteration   3: 1944946100.000 ns/op
# Warmup Iteration   4: 2253955900.000 ns/op
# Warmup Iteration   5: 2006798201.000 ns/op
Iteration   1: 1911401200.000 ns/op
Iteration   2: 2200986400.000 ns/op
Iteration   3: 1891853699.000 ns/op
Iteration   4: 1991681800.000 ns/op
Iteration   5: 2105002600.000 ns/op

# Run progress: 98.00% complete, ETA 00:00:16
# Fork: 5 of 5
# Warmup Iteration   1: 2661510800.000 ns/op
# Warmup Iteration   2: 2271956101.000 ns/op
# Warmup Iteration   3: 2068883701.000 ns/op
# Warmup Iteration   4: 2097988000.000 ns/op
# Warmup Iteration   5: 2352175600.000 ns/op
Iteration   1: 2021451200.000 ns/op
Iteration   2: 2163068500.000 ns/op
Iteration   3: 2169599900.000 ns/op
Iteration   4: 2018023500.000 ns/op
Iteration   5: 2248385201.000 ns/op


Result "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessShort_large":
  2093393511.960 ?99.9%) 125122453.495 ns/op [Average]

  (min, avg, max) = (1845934300.000, 2093393511.960, 2603713101.000), stdev = 167034895.633
  CI (99.9%): [1968271058.465, 2218515965.455] (assumes normal distribution)


# Run complete. Total time: 00:13:40

REMEMBER: The numbers below are just data. To gain reusable insights, you need to follow up on
why the numbers are the way they are. Use profilers (see -prof, -lprof), design factorial
experiments, perform baseline and negative tests that provide experimental control, make sure
the benchmarking environment is safe on JVM/OS/HW level, ask for reviews from the domain experts.
Do not assume the numbers tell you what you want them to tell.

Benchmark                                                             Mode  Cnt           Score           Error  Units
BZip2CompressorOutputStreamXenoAmessTest.testOld                      avgt   25     1231787.906 ?    60747.130  ns/op

BZip2CompressorOutputStreamXenoAmessTest.testOldWithNonBreak             avgt   25     1232199.737 ?    49896.118  ns/op

BZip2CompressorOutputStreamXenoAmessTest.testOldWithNonBreak_large       avgt   25  2120213024.080 ?236049332.413  ns/op

BZip2CompressorOutputStreamXenoAmessTest.testOld_large                avgt   25  2041610315.880 ?157067529.099  ns/op

BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean         avgt   25     1246764.577 ?    74547.986  ns/op

BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean2        avgt   25     1306858.215 ?    72285.499  ns/op

BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean2_large  avgt   25  2145011564.040 ?143188713.146  ns/op

BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean_large   avgt   25  2106667976.120 ?185809834.024  ns/op

BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessShort           avgt   25     1297103.364 ?   136111.284  ns/op

BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessShort_large     avgt   25  2093393511.960 ?125122453.495  ns/op


Benchmark result is saved to target/jmh-result.org.apache.json

@XenoAmess
Copy link
Copy Markdown
Contributor Author

result json

[
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOld",
        "mode" : "avgt",
        "threads" : 1,
        "forks" : 5,
        "jvm" : "C:\\jdk-13.0.2+8\\bin\\java.exe",
        "jvmArgs" : [
        ],
        "jdkVersion" : "13.0.2",
        "vmName" : "OpenJDK 64-Bit Server VM",
        "vmVersion" : "13.0.2+8",
        "warmupIterations" : 5,
        "warmupTime" : "1000 ms",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "1000 ms",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 1231787.9057171796,
            "scoreError" : 60747.12958923382,
            "scoreConfidence" : [
                1171040.7761279459,
                1292535.0353064134
            ],
            "scorePercentiles" : {
                "0.0" : 1117403.0066815144,
                "50.0" : 1206172.8915662651,
                "90.0" : 1357090.8833458365,
                "95.0" : 1397579.7860595766,
                "99.0" : 1407715.308988764,
                "99.9" : 1407715.308988764,
                "99.99" : 1407715.308988764,
                "99.999" : 1407715.308988764,
                "99.9999" : 1407715.308988764,
                "100.0" : 1407715.308988764
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    1177021.6204465334,
                    1127303.7109111361,
                    1258797.7415307402,
                    1315991.2073490813,
                    1205418.4115523465
                ],
                [
                    1117403.0066815144,
                    1120983.110738255,
                    1206172.8915662651,
                    1235757.2839506173,
                    1288148.2670089859
                ],
                [
                    1345864.6505376345,
                    1249905.6097256858,
                    1229342.455214724,
                    1174833.6471277843,
                    1373930.2325581396
                ],
                [
                    1407715.308988764,
                    1319910.290237467,
                    1196952.9916267942,
                    1191689.535077289,
                    1191617.3590963138
                ],
                [
                    1161137.9350348029,
                    1247206.3354037267,
                    1329505.9760956175,
                    1134020.724801812,
                    1188067.3396674583
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOldWithNonBreak",
        "mode" : "avgt",
        "threads" : 1,
        "forks" : 5,
        "jvm" : "C:\\jdk-13.0.2+8\\bin\\java.exe",
        "jvmArgs" : [
        ],
        "jdkVersion" : "13.0.2",
        "vmName" : "OpenJDK 64-Bit Server VM",
        "vmVersion" : "13.0.2+8",
        "warmupIterations" : 5,
        "warmupTime" : "1000 ms",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "1000 ms",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 1232199.7367553925,
            "scoreError" : 49896.117650952154,
            "scoreConfidence" : [
                1182303.6191044403,
                1282095.8544063447
            ],
            "scorePercentiles" : {
                "0.0" : 1138645.4545454546,
                "50.0" : 1220320.2451219512,
                "90.0" : 1330014.3934583652,
                "95.0" : 1416521.2841356166,
                "99.0" : 1447036.6379310344,
                "99.9" : 1447036.6379310344,
                "99.99" : 1447036.6379310344,
                "99.999" : 1447036.6379310344,
                "99.9999" : 1447036.6379310344,
                "100.0" : 1447036.6379310344
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    1219577.6155717762,
                    1217867.5182481753,
                    1239696.6530359355,
                    1345318.7919463087,
                    1188941.567695962
                ],
                [
                    1220320.2451219512,
                    1178962.190812721,
                    1150802.0665901264,
                    1189386.9513641756,
                    1259764.5283018867
                ],
                [
                    1319811.4611330698,
                    1242681.3895781639,
                    1281534.9551856595,
                    1190924.3745541023,
                    1253228.9637952559
                ],
                [
                    1235037.6543209876,
                    1207377.376654633,
                    1169074.7651869159,
                    1166782.2843822844,
                    1138645.4545454546
                ],
                [
                    1201098.4412470025,
                    1236322.207361963,
                    1447036.6379310344,
                    1277316.0114358324,
                    1227483.3128834355
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOldWithNonBreak_large",
        "mode" : "avgt",
        "threads" : 1,
        "forks" : 5,
        "jvm" : "C:\\jdk-13.0.2+8\\bin\\java.exe",
        "jvmArgs" : [
        ],
        "jdkVersion" : "13.0.2",
        "vmName" : "OpenJDK 64-Bit Server VM",
        "vmVersion" : "13.0.2+8",
        "warmupIterations" : 5,
        "warmupTime" : "1000 ms",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "1000 ms",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 2.12021302408E9,
            "scoreError" : 2.360493324134416E8,
            "scoreConfidence" : [
                1.8841636916665583E9,
                2.3562623564934416E9
            ],
            "scorePercentiles" : {
                "0.0" : 1.714751701E9,
                "50.0" : 2.0113718E9,
                "90.0" : 2.4311222794E9,
                "95.0" : 2.969229799299999E9,
                "99.0" : 3.189218899E9,
                "99.9" : 3.189218899E9,
                "99.99" : 3.189218899E9,
                "99.999" : 3.189218899E9,
                "99.9999" : 3.189218899E9,
                "100.0" : 3.189218899E9
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    1.9268256E9,
                    2.043991299E9,
                    1.953332401E9,
                    1.931591201E9,
                    2.0113718E9
                ],
                [
                    2.087423201E9,
                    1.900431E9,
                    1.762311301E9,
                    1.9722613E9,
                    1.907756499E9
                ],
                [
                    1.8461512E9,
                    1.892023E9,
                    1.714751701E9,
                    1.834355999E9,
                    1.9544061E9
                ],
                [
                    2.292780701E9,
                    2.3383052E9,
                    2.293059001E9,
                    2.3146227E9,
                    2.4559219E9
                ],
                [
                    2.2952725E9,
                    2.400574801E9,
                    2.271997099E9,
                    2.414589199E9,
                    3.189218899E9
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testOld_large",
        "mode" : "avgt",
        "threads" : 1,
        "forks" : 5,
        "jvm" : "C:\\jdk-13.0.2+8\\bin\\java.exe",
        "jvmArgs" : [
        ],
        "jdkVersion" : "13.0.2",
        "vmName" : "OpenJDK 64-Bit Server VM",
        "vmVersion" : "13.0.2+8",
        "warmupIterations" : 5,
        "warmupTime" : "1000 ms",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "1000 ms",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 2.04161031588E9,
            "scoreError" : 1.5706752909928608E8,
            "scoreConfidence" : [
                1.884542786780714E9,
                2.198677844979286E9
            ],
            "scorePercentiles" : {
                "0.0" : 1.7256607E9,
                "50.0" : 2.0307501E9,
                "90.0" : 2.38786736E9,
                "95.0" : 2.46114804E9,
                "99.0" : 2.474493E9,
                "99.9" : 2.474493E9,
                "99.99" : 2.474493E9,
                "99.999" : 2.474493E9,
                "99.9999" : 2.474493E9,
                "100.0" : 2.474493E9
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    2.1016981E9,
                    2.0642726E9,
                    2.1872375E9,
                    2.121889301E9,
                    2.0307501E9
                ],
                [
                    1.955578901E9,
                    1.8177623E9,
                    1.8317769E9,
                    1.874995699E9,
                    1.8382277E9
                ],
                [
                    2.474493E9,
                    2.3597724E9,
                    2.2458188E9,
                    2.4300098E9,
                    2.193804199E9
                ],
                [
                    1.7908164E9,
                    1.920142699E9,
                    1.750905001E9,
                    1.7256607E9,
                    1.918628999E9
                ],
                [
                    2.0677578E9,
                    2.003415199E9,
                    2.2743971E9,
                    1.9448107E9,
                    2.115635999E9
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean",
        "mode" : "avgt",
        "threads" : 1,
        "forks" : 5,
        "jvm" : "C:\\jdk-13.0.2+8\\bin\\java.exe",
        "jvmArgs" : [
        ],
        "jdkVersion" : "13.0.2",
        "vmName" : "OpenJDK 64-Bit Server VM",
        "vmVersion" : "13.0.2+8",
        "warmupIterations" : 5,
        "warmupTime" : "1000 ms",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "1000 ms",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 1246764.5772065748,
            "scoreError" : 74547.98612210396,
            "scoreConfidence" : [
                1172216.591084471,
                1321312.5633286787
            ],
            "scorePercentiles" : {
                "0.0" : 1116264.6982182628,
                "50.0" : 1223564.47008547,
                "90.0" : 1395859.386356086,
                "95.0" : 1533512.0073060496,
                "99.0" : 1576530.501572327,
                "99.9" : 1576530.501572327,
                "99.99" : 1576530.501572327,
                "99.999" : 1576530.501572327,
                "99.9999" : 1576530.501572327,
                "100.0" : 1576530.501572327
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    1300187.142857143,
                    1198462.994011976,
                    1185104.8578199053,
                    1171811.3450292398,
                    1251268.25
                ],
                [
                    1180054.5146541619,
                    1433135.520684736,
                    1258284.1695979899,
                    1189417.4791914388,
                    1263270.9962168979
                ],
                [
                    1188949.6448931117,
                    1137079.8185941044,
                    1245094.169975186,
                    1223564.47008547,
                    1116264.6982182628
                ],
                [
                    1194806.6825775655,
                    1223727.0171149145,
                    1168115.6371061844,
                    1262649.684741488,
                    1371008.6301369863
                ],
                [
                    1283710.8834827144,
                    1213653.5108958837,
                    1195208.6021505375,
                    1337753.2085561496,
                    1576530.501572327
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean2",
        "mode" : "avgt",
        "threads" : 1,
        "forks" : 5,
        "jvm" : "C:\\jdk-13.0.2+8\\bin\\java.exe",
        "jvmArgs" : [
        ],
        "jdkVersion" : "13.0.2",
        "vmName" : "OpenJDK 64-Bit Server VM",
        "vmVersion" : "13.0.2+8",
        "warmupIterations" : 5,
        "warmupTime" : "1000 ms",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "1000 ms",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 1306858.2145612794,
            "scoreError" : 72285.49884668845,
            "scoreConfidence" : [
                1234572.7157145909,
                1379143.713407968
            ],
            "scorePercentiles" : {
                "0.0" : 1187167.1423487545,
                "50.0" : 1294347.4160206718,
                "90.0" : 1464736.5628157454,
                "95.0" : 1551573.7845849802,
                "99.0" : 1555641.7701863353,
                "99.9" : 1555641.7701863353,
                "99.99" : 1555641.7701863353,
                "99.999" : 1555641.7701863353,
                "99.9999" : 1555641.7701863353,
                "100.0" : 1555641.7701863353
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    1285297.944801027,
                    1413173.059238364,
                    1277114.156887755,
                    1296659.3023255814,
                    1206067.5903614457
                ],
                [
                    1232945.5104551045,
                    1227347.7478684532,
                    1349307.4123989218,
                    1311445.2162516383,
                    1294939.3054123712
                ],
                [
                    1246975.0,
                    1260959.9496221663,
                    1363623.568119891,
                    1300410.505836576,
                    1381948.6225895316
                ],
                [
                    1187751.9584816133,
                    1192419.5950118764,
                    1187167.1423487545,
                    1542081.8181818181,
                    1386742.6002766252
                ],
                [
                    1356159.3482384824,
                    1555641.7701863353,
                    1268342.9670468948,
                    1294347.4160206718,
                    1252585.8560700875
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean2_large",
        "mode" : "avgt",
        "threads" : 1,
        "forks" : 5,
        "jvm" : "C:\\jdk-13.0.2+8\\bin\\java.exe",
        "jvmArgs" : [
        ],
        "jdkVersion" : "13.0.2",
        "vmName" : "OpenJDK 64-Bit Server VM",
        "vmVersion" : "13.0.2+8",
        "warmupIterations" : 5,
        "warmupTime" : "1000 ms",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "1000 ms",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 2.14501156404E9,
            "scoreError" : 1.4318871314573377E8,
            "scoreConfidence" : [
                2.0018228508942661E9,
                2.288200277185734E9
            ],
            "scorePercentiles" : {
                "0.0" : 1.7524246E9,
                "50.0" : 2.1855709E9,
                "90.0" : 2.4107346798E9,
                "95.0" : 2.427149341E9,
                "99.0" : 2.433456301E9,
                "99.9" : 2.433456301E9,
                "99.99" : 2.433456301E9,
                "99.999" : 2.433456301E9,
                "99.9999" : 2.433456301E9,
                "100.0" : 2.433456301E9
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    2.409602399E9,
                    2.2068406E9,
                    2.412433101E9,
                    2.1855709E9,
                    2.2227325E9
                ],
                [
                    1.9115948E9,
                    1.7524246E9,
                    1.7780846E9,
                    1.9251865E9,
                    1.788871201E9
                ],
                [
                    2.088532799E9,
                    2.2184606E9,
                    2.0720513E9,
                    2.208279999E9,
                    2.1775286E9
                ],
                [
                    2.0896588E9,
                    2.0991648E9,
                    2.115954899E9,
                    2.147097601E9,
                    2.2140105E9
                ],
                [
                    2.247852901E9,
                    2.3233761E9,
                    2.2582152E9,
                    2.433456301E9,
                    2.3383075E9
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessBoolean_large",
        "mode" : "avgt",
        "threads" : 1,
        "forks" : 5,
        "jvm" : "C:\\jdk-13.0.2+8\\bin\\java.exe",
        "jvmArgs" : [
        ],
        "jdkVersion" : "13.0.2",
        "vmName" : "OpenJDK 64-Bit Server VM",
        "vmVersion" : "13.0.2+8",
        "warmupIterations" : 5,
        "warmupTime" : "1000 ms",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "1000 ms",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 2.10666797612E9,
            "scoreError" : 1.858098340238573E8,
            "scoreConfidence" : [
                1.9208581420961425E9,
                2.292477810143857E9
            ],
            "scorePercentiles" : {
                "0.0" : 1.7088213E9,
                "50.0" : 2.1619656E9,
                "90.0" : 2.4410814006E9,
                "95.0" : 2.50018564E9,
                "99.0" : 2.5164241E9,
                "99.9" : 2.5164241E9,
                "99.99" : 2.5164241E9,
                "99.999" : 2.5164241E9,
                "99.9999" : 2.5164241E9,
                "100.0" : 2.5164241E9
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    2.2294312E9,
                    2.1356383E9,
                    2.064529599E9,
                    2.1939016E9,
                    2.181651701E9
                ],
                [
                    1.8551577E9,
                    1.7994689E9,
                    1.775201799E9,
                    1.7088213E9,
                    1.8739581E9
                ],
                [
                    2.2601573E9,
                    2.4622959E9,
                    2.3076374E9,
                    2.4137872E9,
                    2.426938401E9
                ],
                [
                    2.5164241E9,
                    2.2391286E9,
                    2.255470101E9,
                    2.397133601E9,
                    2.1619656E9
                ],
                [
                    1.865237301E9,
                    1.9367017E9,
                    1.7546373E9,
                    1.8668675E9,
                    1.9845572E9
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessShort",
        "mode" : "avgt",
        "threads" : 1,
        "forks" : 5,
        "jvm" : "C:\\jdk-13.0.2+8\\bin\\java.exe",
        "jvmArgs" : [
        ],
        "jdkVersion" : "13.0.2",
        "vmName" : "OpenJDK 64-Bit Server VM",
        "vmVersion" : "13.0.2+8",
        "warmupIterations" : 5,
        "warmupTime" : "1000 ms",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "1000 ms",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 1297103.3636990814,
            "scoreError" : 136111.28365654423,
            "scoreConfidence" : [
                1160992.080042537,
                1433214.6473556256
            ],
            "scorePercentiles" : {
                "0.0" : 1109964.302660754,
                "50.0" : 1249577.1535580524,
                "90.0" : 1563933.7866650722,
                "95.0" : 1849929.0632876495,
                "99.0" : 1896727.97731569,
                "99.9" : 1896727.97731569,
                "99.99" : 1896727.97731569,
                "99.999" : 1896727.97731569,
                "99.9999" : 1896727.97731569,
                "100.0" : 1896727.97731569
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    1170425.4672897197,
                    1179550.2358490566,
                    1140608.2086659065,
                    1109964.302660754,
                    1350190.4197031038
                ],
                [
                    1260401.5094339622,
                    1196957.6372315036,
                    1128279.6400449944,
                    1159284.1251448435,
                    1191038.049940547
                ],
                [
                    1248003.4925187032,
                    1446068.5796269728,
                    1291581.4206451613,
                    1289232.3037323037,
                    1350836.2533692722
                ],
                [
                    1896727.97731569,
                    1740731.5972222222,
                    1387759.0594744121,
                    1315878.374836173,
                    1188316.2502965599
                ],
                [
                    1220996.3459196102,
                    1264384.508816121,
                    1249577.1535580524,
                    1238748.0198019801,
                    1412043.1593794075
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.compress.performance.BZip2CompressorOutputStreamXenoAmessTest.testXenoAmessShort_large",
        "mode" : "avgt",
        "threads" : 1,
        "forks" : 5,
        "jvm" : "C:\\jdk-13.0.2+8\\bin\\java.exe",
        "jvmArgs" : [
        ],
        "jdkVersion" : "13.0.2",
        "vmName" : "OpenJDK 64-Bit Server VM",
        "vmVersion" : "13.0.2+8",
        "warmupIterations" : 5,
        "warmupTime" : "1000 ms",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "1000 ms",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 2.09339351196E9,
            "scoreError" : 1.2512245349525204E8,
            "scoreConfidence" : [
                1.968271058464748E9,
                2.218515965455252E9
            ],
            "scorePercentiles" : {
                "0.0" : 1.8459343E9,
                "50.0" : 2.0743201E9,
                "90.0" : 2.3058365E9,
                "95.0" : 2.5182839307E9,
                "99.0" : 2.603713101E9,
                "99.9" : 2.603713101E9,
                "99.99" : 2.603713101E9,
                "99.999" : 2.603713101E9,
                "99.9999" : 2.603713101E9,
                "100.0" : 2.603713101E9
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    2.1299155E9,
                    1.927480199E9,
                    2.1137672E9,
                    1.9866811E9,
                    2.0261248E9
                ],
                [
                    2.3189492E9,
                    2.0734621E9,
                    2.603713101E9,
                    2.0743201E9,
                    2.074657599E9
                ],
                [
                    1.866583099E9,
                    2.0578543E9,
                    2.216846501E9,
                    2.2970947E9,
                    1.8459343E9
                ],
                [
                    1.9114012E9,
                    2.2009864E9,
                    1.891853699E9,
                    1.9916818E9,
                    2.1050026E9
                ],
                [
                    2.0214512E9,
                    2.1630685E9,
                    2.1695999E9,
                    2.0180235E9,
                    2.248385201E9
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    }
]

@XenoAmess
Copy link
Copy Markdown
Contributor Author

for new commers, the last conversation happened in #106

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.03%) to 87.318% when pulling f9c1679 on XenoAmess:performance_test_for_bzip into 18fb261 on apache:master.

@PeterAlfredLee
Copy link
Copy Markdown
Member

Hey @XenoAmess
What is this PR helping? From my view, you are providing some test results for you PR #106. This PR is not intended to be merged but give some explanizations for #106, is it?

@XenoAmess
Copy link
Copy Markdown
Contributor Author

XenoAmess commented Jun 5, 2020

This PR is not intended to be merged but give some explanizations for #106,

Indeed.
I just have no clue how to show some codes without creating a pr.

@PeterAlfredLee
Copy link
Copy Markdown
Member

No doubt the break won't make things worse.

Sometimes it's more difficult to optimize projects writen by JAVA than ones writen by C. We can use SIMD/SSE and some other optimizations in C but not in JAVA, which is a common and pretty efficent way to optimize performance in projects with lot of computations, like compression. Seems the JIT can provide some optimizations in Runtime but it's controled by JVM itself.

@XenoAmess
Copy link
Copy Markdown
Contributor Author

XenoAmess commented Jun 6, 2020

Seems the JIT can provide some optimizations in Runtime but it's controled by JVM itself.

Yep, JIT seesm an amazing black box.

@XenoAmess XenoAmess closed this Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants