XenoAmess commented on pull request #26:
URL: https://github.com/apache/commons-beanutils/pull/26#issuecomment-637510839
**conclusion:**
very slightly faster when using `==`.
the differences are too small to tell whether it be meaningful.
So I don't think it worth a try.
I will revert the source back to original.
```
[INFO] --- exec-maven-plugin:1.6.0:exec (benchmark) @ commons-beanutils2 ---
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 jav
a.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, 10 s each
# Measurement: 5 iterations, 10 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark:
org.apache.commons.beanutils2.performance.MethodUtilsTest.test1Old
# Run progress: 0.00% complete, ETA 00:25:00
# Fork: 1 of 5
# Warmup Iteration 1: 93985046.729 ns/op
# Warmup Iteration 2: 89269731.858 ns/op
# Warmup Iteration 3: 91302609.091 ns/op
# Warmup Iteration 4: 94933278.302 ns/op
# Warmup Iteration 5: 96449853.846 ns/op
Iteration 1: 89944462.500 ns/op
Iteration 2: 92243749.541 ns/op
Iteration 3: 90922288.182 ns/op
Iteration 4: 96979610.577 ns/op
Iteration 5: 97190037.864 ns/op
# Run progress: 6.67% complete, ETA 00:23:33
# Fork: 2 of 5
# Warmup Iteration 1: 111559433.333 ns/op
# Warmup Iteration 2: 102800960.204 ns/op
# Warmup Iteration 3: 96120877.143 ns/op
# Warmup Iteration 4: 95429132.381 ns/op
# Warmup Iteration 5: 96871473.077 ns/op
Iteration 1: 96695673.077 ns/op
Iteration 2: 95652665.714 ns/op
Iteration 3: 97790140.777 ns/op
Iteration 4: 96001642.857 ns/op
Iteration 5: 96198664.423 ns/op
# Run progress: 13.33% complete, ETA 00:21:52
# Fork: 3 of 5
# Warmup Iteration 1: 91571049.091 ns/op
# Warmup Iteration 2: 92321123.853 ns/op
# Warmup Iteration 3: 89182005.310 ns/op
# Warmup Iteration 4: 90579457.658 ns/op
# Warmup Iteration 5: 90943608.108 ns/op
Iteration 1: 88428731.579 ns/op
Iteration 2: 87563089.565 ns/op
Iteration 3: 86873519.828 ns/op
Iteration 4: 93504626.168 ns/op
Iteration 5: 90098775.000 ns/op
# Run progress: 20.00% complete, ETA 00:20:12
# Fork: 4 of 5
# Warmup Iteration 1: 91528859.091 ns/op
# Warmup Iteration 2: 89657351.786 ns/op
# Warmup Iteration 3: 91321793.636 ns/op
# Warmup Iteration 4: 90527813.514 ns/op
# Warmup Iteration 5: 91863153.211 ns/op
Iteration 1: 91480587.273 ns/op
Iteration 2: 91083510.909 ns/op
Iteration 3: 92378247.706 ns/op
Iteration 4: 94616584.906 ns/op
Iteration 5: 92377820.183 ns/op
# Run progress: 26.67% complete, ETA 00:18:30
# Fork: 5 of 5
# Warmup Iteration 1: 96553372.115 ns/op
# Warmup Iteration 2: 103810997.938 ns/op
# Warmup Iteration 3: 108521727.957 ns/op
# Warmup Iteration 4: 105716888.421 ns/op
# Warmup Iteration 5: 93942915.888 ns/op
Iteration 1: 99457753.465 ns/op
Iteration 2: 96386899.038 ns/op
Iteration 3: 95141818.868 ns/op
Iteration 4: 93229752.778 ns/op
Iteration 5: 93150508.333 ns/op
Result "org.apache.commons.beanutils2.performance.MethodUtilsTest.test1Old":
93415646.444 ?99.9%) 2512714.250 ns/op [Average]
(min, avg, max) = (86873519.828, 93415646.444, 99457753.465), stdev =
3354401.635
CI (99.9%): [90902932.194, 95928360.695] (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, 10 s each
# Measurement: 5 iterations, 10 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.beanutils2.performance.MethodUtilsTest.test6
# Run progress: 33.33% complete, ETA 00:16:49
# Fork: 1 of 5
# Warmup Iteration 1: 113733287.640 ns/op
# Warmup Iteration 2: 112831113.483 ns/op
# Warmup Iteration 3: 115950360.920 ns/op
# Warmup Iteration 4: 112180330.000 ns/op
# Warmup Iteration 5: 111960424.444 ns/op
Iteration 1: 113214140.449 ns/op
Iteration 2: 114369615.909 ns/op
Iteration 3: 112366875.556 ns/op
Iteration 4: 113877134.091 ns/op
Iteration 5: 113252111.236 ns/op
# Run progress: 40.00% complete, ETA 00:15:08
# Fork: 2 of 5
# Warmup Iteration 1: 104018457.732 ns/op
# Warmup Iteration 2: 100048433.000 ns/op
# Warmup Iteration 3: 102312431.633 ns/op
# Warmup Iteration 4: 100306799.000 ns/op
# Warmup Iteration 5: 101524631.313 ns/op
Iteration 1: 104236657.292 ns/op
Iteration 2: 99256118.812 ns/op
Iteration 3: 99609023.762 ns/op
Iteration 4: 104458863.542 ns/op
Iteration 5: 100647027.000 ns/op
# Run progress: 46.67% complete, ETA 00:13:27
# Fork: 3 of 5
# Warmup Iteration 1: 104645209.375 ns/op
# Warmup Iteration 2: 102157482.828 ns/op
# Warmup Iteration 3: 102590727.551 ns/op
# Warmup Iteration 4: 104905739.583 ns/op
# Warmup Iteration 5: 112721533.708 ns/op
Iteration 1: 108625424.731 ns/op
Iteration 2: 107136692.553 ns/op
Iteration 3: 103387634.021 ns/op
Iteration 4: 102186388.776 ns/op
Iteration 5: 101058504.040 ns/op
# Run progress: 53.33% complete, ETA 00:11:46
# Fork: 4 of 5
# Warmup Iteration 1: 101983920.202 ns/op
# Warmup Iteration 2: 99927023.762 ns/op
# Warmup Iteration 3: 101053696.970 ns/op
# Warmup Iteration 4: 100488762.000 ns/op
# Warmup Iteration 5: 99057479.208 ns/op
Iteration 1: 102037597.980 ns/op
Iteration 2: 100783297.000 ns/op
Iteration 3: 99314166.337 ns/op
Iteration 4: 100237541.000 ns/op
Iteration 5: 99370560.396 ns/op
# Run progress: 60.00% complete, ETA 00:10:05
# Fork: 5 of 5
# Warmup Iteration 1: 103218712.371 ns/op
# Warmup Iteration 2: 101928880.808 ns/op
# Warmup Iteration 3: 105836560.000 ns/op
# Warmup Iteration 4: 103152639.175 ns/op
# Warmup Iteration 5: 102408197.959 ns/op
Iteration 1: 101901286.869 ns/op
Iteration 2: 100530736.000 ns/op
Iteration 3: 101170969.697 ns/op
Iteration 4: 100870147.000 ns/op
Iteration 5: 103158626.804 ns/op
Result "org.apache.commons.beanutils2.performance.MethodUtilsTest.test6":
104282285.634 ?99.9%) 3889736.409 ns/op [Average]
(min, avg, max) = (99256118.812, 104282285.634, 114369615.909), stdev =
5192686.820
CI (99.9%): [100392549.225, 108172022.043] (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, 10 s each
# Measurement: 5 iterations, 10 s each
# Timeout: 10 min per iteration
# Threads: 1 thread, will synchronize iterations
# Benchmark mode: Average time, time/op
# Benchmark: org.apache.commons.beanutils2.performance.MethodUtilsTest.test7
# Run progress: 66.67% complete, ETA 00:08:24
# Fork: 1 of 5
# Warmup Iteration 1: 95833414.286 ns/op
# Warmup Iteration 2: 93795977.570 ns/op
# Warmup Iteration 3: 92578071.560 ns/op
# Warmup Iteration 4: 91298069.091 ns/op
# Warmup Iteration 5: 94004421.495 ns/op
Iteration 1: 95640756.190 ns/op
Iteration 2: 99920087.129 ns/op
Iteration 3: 98081500.000 ns/op
Iteration 4: 107606839.785 ns/op
Iteration 5: 92189584.404 ns/op
# Run progress: 73.33% complete, ETA 00:06:43
# Fork: 2 of 5
# Warmup Iteration 1: 90941670.909 ns/op
# Warmup Iteration 2: 90997350.450 ns/op
# Warmup Iteration 3: 89374275.000 ns/op
# Warmup Iteration 4: 90936825.455 ns/op
# Warmup Iteration 5: 90643864.865 ns/op
Iteration 1: 91017040.909 ns/op
Iteration 2: 90012902.679 ns/op
Iteration 3: 90250466.667 ns/op
Iteration 4: 90297713.514 ns/op
Iteration 5: 90478001.802 ns/op
# Run progress: 80.00% complete, ETA 00:05:02
# Fork: 3 of 5
# Warmup Iteration 1: 96482337.500 ns/op
# Warmup Iteration 2: 94369611.321 ns/op
# Warmup Iteration 3: 93276022.222 ns/op
# Warmup Iteration 4: 94552908.491 ns/op
# Warmup Iteration 5: 94501847.170 ns/op
Iteration 1: 96213824.762 ns/op
Iteration 2: 94839509.434 ns/op
Iteration 3: 94144447.664 ns/op
Iteration 4: 94854984.906 ns/op
Iteration 5: 93627229.907 ns/op
# Run progress: 86.67% complete, ETA 00:03:21
# Fork: 4 of 5
# Warmup Iteration 1: 87345260.870 ns/op
# Warmup Iteration 2: 86781725.000 ns/op
# Warmup Iteration 3: 86954314.655 ns/op
# Warmup Iteration 4: 87142766.087 ns/op
# Warmup Iteration 5: 86131800.855 ns/op
Iteration 1: 87000113.913 ns/op
Iteration 2: 87230060.870 ns/op
Iteration 3: 86832924.138 ns/op
Iteration 4: 89844925.000 ns/op
Iteration 5: 98461419.608 ns/op
# Run progress: 93.33% complete, ETA 00:01:40
# Fork: 5 of 5
# Warmup Iteration 1: 98404116.667 ns/op
# Warmup Iteration 2: 93658276.636 ns/op
# Warmup Iteration 3: 89806518.750 ns/op
# Warmup Iteration 4: 89957507.143 ns/op
# Warmup Iteration 5: 89735104.464 ns/op
Iteration 1: 91183716.364 ns/op
Iteration 2: 93343467.593 ns/op
Iteration 3: 90201028.829 ns/op
Iteration 4: 89532421.429 ns/op
Iteration 5: 93371628.704 ns/op
Result "org.apache.commons.beanutils2.performance.MethodUtilsTest.test7":
93047063.848 ?99.9%) 3480389.776 ns/op [Average]
(min, avg, max) = (86832924.138, 93047063.848, 107606839.785), stdev =
4646220.776
CI (99.9%): [89566674.072, 96527453.624] (assumes normal distribution)
# Run complete. Total time: 00:25:14
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
MethodUtilsTest.test1Old avgt 25 93415646.444 ?2512714.250 ns/op
MethodUtilsTest.test6 avgt 25 104282285.634 ?3889736.409 ns/op
MethodUtilsTest.test7 avgt 25 93047063.848 ?3480389.776 ns/op
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]