commons-lang icon indicating copy to clipboard operation
commons-lang copied to clipboard

[LANG-1548] split regionMatches for better performance

Open XenoAmess opened this issue 4 years ago • 8 comments

XenoAmess avatar May 31 '20 07:05 XenoAmess

Coverage Status

Coverage increased (+0.005%) to 94.962% when pulling d9be6a31d523ecd6764951d961ab63c002e08640 on xenoamess-fork:split_regionMatches_for_better_performance into e233ab6b1464601341cc77ac489e9358aa45fbed on apache:master.

coveralls avatar May 31 '20 21:05 coveralls

also want to split StringUtils.startswith, endwith, prependIfMissing... now the call flow is like this:

  1. user call startsWith(final CharSequence str, final CharSequence prefix)
  2. give an additional boolean, and invoke startsWith(final CharSequence str, final CharSequence prefix, final boolean ignoreCase)
  3. invoke CharSequenceUtils.regionMatches(str, ignoreCase, 0, prefix, 0, prefix.length());
  4. in CharSequenceUtils.regionMatches(str, ignoreCase, 0, prefix, 0, prefix.length()) we detect that boolean.

That is, actually weird, as when we call startsWith(final CharSequence str, final CharSequence prefix) we know the boolean is false, and we still fill a false boolean and let it detect at runtime. But, detecting a boolean is not a big performance issue (if not in a loop and perform tons of times) So I leave it unchanged for next pr. We can discuss whether should split regionMatches first.

XenoAmess avatar May 31 '20 22:05 XenoAmess

Hi. According to 72 Hour Lazy Consensus rule, if nobody against this pr, I will continue developing codes about this pr in 50 hours later, means spliting more functions in StringUtils including startsWith, endsWith and so on.

XenoAmess avatar Jun 01 '20 16:06 XenoAmess

@garydgregory

Conclusion: after doing the splition, it can speed up around 25%.

[INFO] --- exec-maven-plugin:1.6.0:exec (benchmark) @ commons-lang3 ---
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, 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.lang3.CharSequenceUtilsRegionMatchesTest.testNew

# Run progress: 0.00% complete, ETA 00:50:00
# Fork: 1 of 5
# Warmup Iteration   1: 1676780966.667 ns/op
# Warmup Iteration   2: 1771491016.667 ns/op
# Warmup Iteration   3: 1581506185.714 ns/op
# Warmup Iteration   4: 2056147750.000 ns/op
# Warmup Iteration   5: 1432607457.143 ns/op
Iteration   1: 1810178866.667 ns/op
Iteration   2: 1446362657.143 ns/op
Iteration   3: 1748144866.667 ns/op
Iteration   4: 1605476071.429 ns/op
Iteration   5: 1794209950.000 ns/op

# Run progress: 3.33% complete, ETA 00:52:22
# Fork: 2 of 5
# Warmup Iteration   1: 1511623771.429 ns/op
# Warmup Iteration   2: 1495295371.429 ns/op
# Warmup Iteration   3: 1495742928.571 ns/op
# Warmup Iteration   4: 1722803700.000 ns/op
# Warmup Iteration   5: 1482953414.286 ns/op
Iteration   1: 1745675116.667 ns/op
Iteration   2: 1611334828.571 ns/op
Iteration   3: 1673340485.714 ns/op
Iteration   4: 1357552837.500 ns/op
Iteration   5: 1564756800.000 ns/op

# Run progress: 6.67% complete, ETA 00:50:36
# Fork: 3 of 5
# Warmup Iteration   1: 1717714433.333 ns/op
# Warmup Iteration   2: 1775668516.667 ns/op
# Warmup Iteration   3: 1762111866.667 ns/op
# Warmup Iteration   4: 2135332980.000 ns/op
# Warmup Iteration   5: 1715229116.667 ns/op
Iteration   1: 1966963233.333 ns/op
Iteration   2: 2031982040.000 ns/op
Iteration   3: 1813285066.667 ns/op
Iteration   4: 1934091583.333 ns/op
Iteration   5: 1990891316.667 ns/op

# Run progress: 10.00% complete, ETA 00:49:03
# Fork: 4 of 5
# Warmup Iteration   1: 1637729900.000 ns/op
# Warmup Iteration   2: 2080932760.000 ns/op
# Warmup Iteration   3: 1770361200.000 ns/op
# Warmup Iteration   4: 1370627400.000 ns/op
# Warmup Iteration   5: 1629913900.000 ns/op
Iteration   1: 2002821900.000 ns/op
Iteration   2: 1841407766.667 ns/op
Iteration   3: 1609561685.714 ns/op
Iteration   4: 1557553557.143 ns/op
Iteration   5: 1677166966.667 ns/op

# Run progress: 13.33% complete, ETA 00:47:13
# Fork: 5 of 5
# Warmup Iteration   1: 1319836937.500 ns/op
# Warmup Iteration   2: 1540287771.429 ns/op
# Warmup Iteration   3: 1593160257.143 ns/op
# Warmup Iteration   4: 1546483685.714 ns/op
# Warmup Iteration   5: 1543815542.857 ns/op
Iteration   1: 1682335566.667 ns/op
Iteration   2: 1566039728.571 ns/op
Iteration   3: 1694355566.667 ns/op
Iteration   4: 1599394871.429 ns/op
Iteration   5: 1757485850.000 ns/op


Result "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.testNew":
  1723294767.195 ?99.9%) 131123557.188 ns/op [Average]

  (min, avg, max) = (1357552837.500, 1723294767.195, 2031982040.000), stdev = 175046197.369
  CI (99.9%): [1592171210.007, 1854418324.383] (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.lang3.CharSequenceUtilsRegionMatchesTest.testOld

# Run progress: 16.67% complete, ETA 00:45:19
# Fork: 1 of 5
# Warmup Iteration   1: 1830971983.333 ns/op
# Warmup Iteration   2: 2188674760.000 ns/op
# Warmup Iteration   3: 2181211500.000 ns/op
# Warmup Iteration   4: 2349953100.000 ns/op
# Warmup Iteration   5: 2360081080.000 ns/op
Iteration   1: 2212511940.000 ns/op
Iteration   2: 2384214220.000 ns/op
Iteration   3: 2227561540.000 ns/op
Iteration   4: 2312551740.000 ns/op
Iteration   5: 2426368360.000 ns/op

# Run progress: 20.00% complete, ETA 00:43:56
# Fork: 2 of 5
# Warmup Iteration   1: 2717844250.000 ns/op
# Warmup Iteration   2: 2585462975.000 ns/op
# Warmup Iteration   3: 2473264440.000 ns/op
# Warmup Iteration   4: 2270443600.000 ns/op
# Warmup Iteration   5: 1808085450.000 ns/op
Iteration   1: 2028658920.000 ns/op
Iteration   2: 2032796820.000 ns/op
Iteration   3: 2038743100.000 ns/op
Iteration   4: 2217756360.000 ns/op
Iteration   5: 2352394580.000 ns/op

# Run progress: 23.33% complete, ETA 00:42:08
# Fork: 3 of 5
# Warmup Iteration   1: 2084758120.000 ns/op
# Warmup Iteration   2: 1932792450.000 ns/op
# Warmup Iteration   3: 2002423360.000 ns/op
# Warmup Iteration   4: 2377394140.000 ns/op
# Warmup Iteration   5: 2107299380.000 ns/op
Iteration   1: 2456784940.000 ns/op
Iteration   2: 2353495040.000 ns/op
Iteration   3: 2355378120.000 ns/op
Iteration   4: 2271070960.000 ns/op
Iteration   5: 1892835216.667 ns/op

# Run progress: 26.67% complete, ETA 00:40:29
# Fork: 4 of 5
# Warmup Iteration   1: 1807640716.667 ns/op
# Warmup Iteration   2: 2016794460.000 ns/op
# Warmup Iteration   3: 2198285300.000 ns/op
# Warmup Iteration   4: 2100802840.000 ns/op
# Warmup Iteration   5: 2311592060.000 ns/op
Iteration   1: 2380056300.000 ns/op
Iteration   2: 2138964640.000 ns/op
Iteration   3: 2291114240.000 ns/op
Iteration   4: 2349544800.000 ns/op
Iteration   5: 2390796680.000 ns/op

# Run progress: 30.00% complete, ETA 00:38:44
# Fork: 5 of 5
# Warmup Iteration   1: 2325848660.000 ns/op
# Warmup Iteration   2: 2471929880.000 ns/op
# Warmup Iteration   3: 2182010260.000 ns/op
# Warmup Iteration   4: 1941523050.000 ns/op
# Warmup Iteration   5: 2275766680.000 ns/op
Iteration   1: 2225102700.000 ns/op
Iteration   2: 2390513420.000 ns/op
Iteration   3: 2354390080.000 ns/op
Iteration   4: 2202851920.000 ns/op
Iteration   5: 2233467340.000 ns/op


Result "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.testOld":
  2260796959.067 ?99.9%) 107182112.664 ns/op [Average]

  (min, avg, max) = (1892835216.667, 2260796959.067, 2456784940.000), stdev = 143085053.900
  CI (99.9%): [2153614846.403, 2367979071.730] (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

XenoAmess avatar Jun 02 '20 02:06 XenoAmess

I refined the test source, and give it a retest. result:

[INFO] --- exec-maven-plugin:1.6.0:exec (benchmark) @ commons-lang3 ---
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/openjd
k/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, 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.lang3.CharSequenceUtilsRegionMatchesTest.test0New

# Run progress: 0.00% complete, ETA 01:15:00
# Fork: 1 of 5
# Warmup Iteration   1: 2891811.998 ns/op
# Warmup Iteration   2: 2416673.665 ns/op
# Warmup Iteration   3: 2446011.030 ns/op
# Warmup Iteration   4: 2449321.915 ns/op
# Warmup Iteration   5: 2447740.822 ns/op
Iteration   1: 2461469.062 ns/op
Iteration   2: 2442310.061 ns/op
Iteration   3: 2427010.386 ns/op
Iteration   4: 2421185.766 ns/op
Iteration   5: 2419471.335 ns/op

# Run progress: 2.22% complete, ETA 01:13:53
# Fork: 2 of 5
# Warmup Iteration   1: 2273738.841 ns/op
# Warmup Iteration   2: 2401915.102 ns/op
# Warmup Iteration   3: 2480256.930 ns/op
# Warmup Iteration   4: 2456014.980 ns/op
# Warmup Iteration   5: 2500686.453 ns/op
Iteration   1: 2451503.358 ns/op
Iteration   2: 2598355.209 ns/op
Iteration   3: 2466372.503 ns/op
Iteration   4: 2653839.453 ns/op
Iteration   5: 2618707.408 ns/op

# Run progress: 4.44% complete, ETA 01:12:09
# Fork: 3 of 5
# Warmup Iteration   1: 2280302.941 ns/op
# Warmup Iteration   2: 2384730.465 ns/op
# Warmup Iteration   3: 2482601.067 ns/op
# Warmup Iteration   4: 2622762.795 ns/op
# Warmup Iteration   5: 2478504.832 ns/op
Iteration   1: 2476611.191 ns/op
Iteration   2: 2419733.680 ns/op
Iteration   3: 2508645.071 ns/op
Iteration   4: 2410321.065 ns/op
Iteration   5: 2649508.079 ns/op

# Run progress: 6.67% complete, ETA 01:10:25
# Fork: 4 of 5
# Warmup Iteration   1: 2305637.137 ns/op
# Warmup Iteration   2: 2450478.780 ns/op
# Warmup Iteration   3: 2397859.012 ns/op
# Warmup Iteration   4: 2389567.344 ns/op
# Warmup Iteration   5: 2431105.348 ns/op
Iteration   1: 2305189.675 ns/op
Iteration   2: 2347030.760 ns/op
Iteration   3: 2299801.793 ns/op
Iteration   4: 2322225.215 ns/op
Iteration   5: 2303393.023 ns/op

# Run progress: 8.89% complete, ETA 01:08:45
# Fork: 5 of 5
# Warmup Iteration   1: 2160220.039 ns/op
# Warmup Iteration   2: 2265527.588 ns/op
# Warmup Iteration   3: 2314211.754 ns/op
# Warmup Iteration   4: 2296356.211 ns/op
# Warmup Iteration   5: 2309983.141 ns/op
Iteration   1: 2320520.784 ns/op
Iteration   2: 2630687.164 ns/op
Iteration   3: 2464871.970 ns/op
Iteration   4: 2541760.457 ns/op
Iteration   5: 2415263.149 ns/op


Result "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test0New":
  2455031.505 ?99.9%) 82596.431 ns/op [Average]

  (min, avg, max) = (2299801.793, 2455031.505, 2653839.453), stdev = 110263.873
  CI (99.9%): [2372435.074, 2537627.936] (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.lang3.CharSequenceUtilsRegionMatchesTest.test0NewInline

# Run progress: 11.11% complete, ETA 01:07:03
# Fork: 1 of 5
# Warmup Iteration   1: 2033885.418 ns/op
# Warmup Iteration   2: 2050448.032 ns/op
# Warmup Iteration   3: 2112706.717 ns/op
# Warmup Iteration   4: 2028930.365 ns/op
# Warmup Iteration   5: 2097623.653 ns/op
Iteration   1: 2297479.215 ns/op
Iteration   2: 2144106.194 ns/op
Iteration   3: 2131691.624 ns/op
Iteration   4: 2154484.859 ns/op
Iteration   5: 2087501.336 ns/op

# Run progress: 13.33% complete, ETA 01:05:22
# Fork: 2 of 5
# Warmup Iteration   1: 2053510.450 ns/op
# Warmup Iteration   2: 2051584.943 ns/op
# Warmup Iteration   3: 2043047.845 ns/op
# Warmup Iteration   4: 2066176.426 ns/op
# Warmup Iteration   5: 2048739.033 ns/op
Iteration   1: 2407814.588 ns/op
Iteration   2: 2256505.054 ns/op
Iteration   3: 2270761.430 ns/op
Iteration   4: 2174536.739 ns/op
Iteration   5: 2127787.513 ns/op

# Run progress: 15.56% complete, ETA 01:03:41
# Fork: 3 of 5
# Warmup Iteration   1: 2180176.482 ns/op
# Warmup Iteration   2: 2102209.395 ns/op
# Warmup Iteration   3: 2190961.687 ns/op
# Warmup Iteration   4: 2165113.185 ns/op
# Warmup Iteration   5: 2287634.927 ns/op
Iteration   1: 2268659.469 ns/op
Iteration   2: 2254443.913 ns/op
Iteration   3: 2252960.892 ns/op
Iteration   4: 2146608.049 ns/op
Iteration   5: 2229433.987 ns/op

# Run progress: 17.78% complete, ETA 01:02:00
# Fork: 4 of 5
# Warmup Iteration   1: 2126465.030 ns/op
# Warmup Iteration   2: 2141745.846 ns/op
# Warmup Iteration   3: 2134863.287 ns/op
# Warmup Iteration   4: 2140523.860 ns/op
# Warmup Iteration   5: 2189996.606 ns/op
Iteration   1: 2173373.968 ns/op
Iteration   2: 2195027.744 ns/op
Iteration   3: 2163932.064 ns/op
Iteration   4: 2180778.613 ns/op
Iteration   5: 2128450.277 ns/op

# Run progress: 20.00% complete, ETA 01:00:20
# Fork: 5 of 5
# Warmup Iteration   1: 2140320.223 ns/op
# Warmup Iteration   2: 2177012.797 ns/op
# Warmup Iteration   3: 2162345.903 ns/op
# Warmup Iteration   4: 2129249.702 ns/op
# Warmup Iteration   5: 2147906.635 ns/op
Iteration   1: 2155641.186 ns/op
Iteration   2: 2220715.786 ns/op
Iteration   3: 2168189.142 ns/op
Iteration   4: 2249981.152 ns/op
Iteration   5: 2411927.989 ns/op


Result "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test0NewInline":
  2210111.711 ?99.9%) 61020.046 ns/op [Average]

  (min, avg, max) = (2087501.336, 2210111.711, 2411927.989), stdev = 81460.016
  CI (99.9%): [2149091.665, 2271131.757] (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.lang3.CharSequenceUtilsRegionMatchesTest.test0Old

# Run progress: 22.22% complete, ETA 00:58:39
# Fork: 1 of 5
# Warmup Iteration   1: 2296448.118 ns/op
# Warmup Iteration   2: 2463329.205 ns/op
# Warmup Iteration   3: 2479069.616 ns/op
# Warmup Iteration   4: 2406087.515 ns/op
# Warmup Iteration   5: 2490171.297 ns/op
Iteration   1: 2781533.482 ns/op
Iteration   2: 2515891.925 ns/op
Iteration   3: 2708546.548 ns/op
Iteration   4: 2593129.997 ns/op
Iteration   5: 2536440.908 ns/op

# Run progress: 24.44% complete, ETA 00:56:59
# Fork: 2 of 5
# Warmup Iteration   1: 2286218.342 ns/op
# Warmup Iteration   2: 2390788.193 ns/op
# Warmup Iteration   3: 2357787.674 ns/op
# Warmup Iteration   4: 2598509.587 ns/op
# Warmup Iteration   5: 2444490.320 ns/op
Iteration   1: 2435692.913 ns/op
Iteration   2: 2521154.032 ns/op
Iteration   3: 2576613.550 ns/op
Iteration   4: 2853638.773 ns/op
Iteration   5: 2995338.593 ns/op

# Run progress: 26.67% complete, ETA 00:55:18
# Fork: 3 of 5
# Warmup Iteration   1: 2341058.825 ns/op
# Warmup Iteration   2: 2487933.731 ns/op
# Warmup Iteration   3: 2679692.242 ns/op
# Warmup Iteration   4: 2699643.482 ns/op
# Warmup Iteration   5: 2659751.862 ns/op
Iteration   1: 2687993.362 ns/op
Iteration   2: 2636774.400 ns/op
Iteration   3: 2612644.514 ns/op
Iteration   4: 2619855.867 ns/op
Iteration   5: 2952721.888 ns/op

# Run progress: 28.89% complete, ETA 00:53:39
# Fork: 4 of 5
# Warmup Iteration   1: 2314151.273 ns/op
# Warmup Iteration   2: 2311217.865 ns/op
# Warmup Iteration   3: 2520279.768 ns/op
# Warmup Iteration   4: 2747563.187 ns/op
# Warmup Iteration   5: 2833241.234 ns/op
Iteration   1: 2774529.016 ns/op
Iteration   2: 2701584.657 ns/op
Iteration   3: 2613871.309 ns/op
Iteration   4: 2692790.072 ns/op
Iteration   5: 2606149.244 ns/op

# Run progress: 31.11% complete, ETA 00:51:58
# Fork: 5 of 5
# Warmup Iteration   1: 2450734.354 ns/op
# Warmup Iteration   2: 2436959.844 ns/op
# Warmup Iteration   3: 2570785.377 ns/op
# Warmup Iteration   4: 2632124.184 ns/op
# Warmup Iteration   5: 2421804.794 ns/op
Iteration   1: 2460663.395 ns/op
Iteration   2: 2603987.279 ns/op
Iteration   3: 2840139.466 ns/op
Iteration   4: 2630008.651 ns/op
Iteration   5: 2957191.143 ns/op


Result "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test0Old":
  2676355.399 ?99.9%) 113788.180 ns/op [Average]

  (min, avg, max) = (2435692.913, 2676355.399, 2995338.593), stdev = 151903.965
  CI (99.9%): [2562567.219, 2790143.580] (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.lang3.CharSequenceUtilsRegionMatchesTest.test1New

# Run progress: 33.33% complete, ETA 00:50:17
# Fork: 1 of 5
# Warmup Iteration   1: 2426667.758 ns/op
# Warmup Iteration   2: 2580098.918 ns/op
# Warmup Iteration   3: 2571482.129 ns/op
# Warmup Iteration   4: 2529823.407 ns/op
# Warmup Iteration   5: 2320318.028 ns/op
Iteration   1: 2054070.883 ns/op
Iteration   2: 2040438.066 ns/op
Iteration   3: 2069738.154 ns/op
Iteration   4: 2103957.068 ns/op
Iteration   5: 2182479.598 ns/op

# Run progress: 35.56% complete, ETA 00:48:37
# Fork: 2 of 5
# Warmup Iteration   1: 2174835.921 ns/op
# Warmup Iteration   2: 2218534.206 ns/op
# Warmup Iteration   3: 2086122.424 ns/op
# Warmup Iteration   4: 2070019.975 ns/op
# Warmup Iteration   5: 2046579.153 ns/op
Iteration   1: 2051590.546 ns/op
Iteration   2: 2069987.500 ns/op
Iteration   3: 2150056.191 ns/op
Iteration   4: 2330735.260 ns/op
Iteration   5: 2466840.838 ns/op

# Run progress: 37.78% complete, ETA 00:46:56
# Fork: 3 of 5
# Warmup Iteration   1: 2352806.469 ns/op
# Warmup Iteration   2: 2235363.679 ns/op
# Warmup Iteration   3: 2241822.120 ns/op
# Warmup Iteration   4: 2233345.144 ns/op
# Warmup Iteration   5: 2222706.600 ns/op
Iteration   1: 2100434.250 ns/op
Iteration   2: 2097353.030 ns/op
Iteration   3: 2133263.076 ns/op
Iteration   4: 2048687.300 ns/op
Iteration   5: 2046222.975 ns/op

# Run progress: 40.00% complete, ETA 00:45:15
# Fork: 4 of 5
# Warmup Iteration   1: 2099352.130 ns/op
# Warmup Iteration   2: 2352367.215 ns/op
# Warmup Iteration   3: 2331797.878 ns/op
# Warmup Iteration   4: 2237189.709 ns/op
# Warmup Iteration   5: 2300014.095 ns/op
Iteration   1: 2218060.953 ns/op
Iteration   2: 2364284.992 ns/op
Iteration   3: 2330102.926 ns/op
Iteration   4: 2323436.748 ns/op
Iteration   5: 2283122.194 ns/op

# Run progress: 42.22% complete, ETA 00:43:35
# Fork: 5 of 5
# Warmup Iteration   1: 2305056.879 ns/op
# Warmup Iteration   2: 2276502.480 ns/op
# Warmup Iteration   3: 2285548.618 ns/op
# Warmup Iteration   4: 2421032.873 ns/op
# Warmup Iteration   5: 2421462.551 ns/op
Iteration   1: 2378152.888 ns/op
Iteration   2: 2233180.308 ns/op
Iteration   3: 2298024.305 ns/op
Iteration   4: 2316953.255 ns/op
Iteration   5: 2393437.760 ns/op


Result "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test1New":
  2203384.443 ?99.9%) 100739.661 ns/op [Average]

  (min, avg, max) = (2040438.066, 2203384.443, 2466840.838), stdev = 134484.565
  CI (99.9%): [2102644.782, 2304124.103] (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.lang3.CharSequenceUtilsRegionMatchesTest.test1NewInline

# Run progress: 44.44% complete, ETA 00:41:54
# Fork: 1 of 5
# Warmup Iteration   1: 2432500.607 ns/op
# Warmup Iteration   2: 2647328.930 ns/op
# Warmup Iteration   3: 2452659.294 ns/op
# Warmup Iteration   4: 2563093.390 ns/op
# Warmup Iteration   5: 2590859.741 ns/op
Iteration   1: 2300172.631 ns/op
Iteration   2: 2280273.986 ns/op
Iteration   3: 2415869.747 ns/op
Iteration   4: 2458107.840 ns/op
Iteration   5: 2473778.185 ns/op

# Run progress: 46.67% complete, ETA 00:40:14
# Fork: 2 of 5
# Warmup Iteration   1: 2545584.602 ns/op
# Warmup Iteration   2: 2899147.435 ns/op
# Warmup Iteration   3: 2532247.392 ns/op
# Warmup Iteration   4: 2287584.587 ns/op
# Warmup Iteration   5: 2251588.744 ns/op
Iteration   1: 2187909.582 ns/op
Iteration   2: 2241326.798 ns/op
Iteration   3: 2253805.926 ns/op
Iteration   4: 2202241.268 ns/op
Iteration   5: 2415944.444 ns/op

# Run progress: 48.89% complete, ETA 00:38:33
# Fork: 3 of 5
# Warmup Iteration   1: 2329673.508 ns/op
# Warmup Iteration   2: 2516915.576 ns/op
# Warmup Iteration   3: 2340724.175 ns/op
# Warmup Iteration   4: 2322373.880 ns/op
# Warmup Iteration   5: 2043788.476 ns/op
Iteration   1: 2055118.245 ns/op
Iteration   2: 2036965.424 ns/op
Iteration   3: 2273757.399 ns/op
Iteration   4: 2289730.266 ns/op
Iteration   5: 2268470.118 ns/op

# Run progress: 51.11% complete, ETA 00:36:53
# Fork: 4 of 5
# Warmup Iteration   1: 2314722.587 ns/op
# Warmup Iteration   2: 2266137.766 ns/op
# Warmup Iteration   3: 2305598.386 ns/op
# Warmup Iteration   4: 2299486.322 ns/op
# Warmup Iteration   5: 2363969.983 ns/op
Iteration   1: 2380796.240 ns/op
Iteration   2: 2478518.439 ns/op
Iteration   3: 2541582.266 ns/op
Iteration   4: 2426567.661 ns/op
Iteration   5: 2376820.651 ns/op

# Run progress: 53.33% complete, ETA 00:35:12
# Fork: 5 of 5
# Warmup Iteration   1: 2362718.923 ns/op
# Warmup Iteration   2: 2282046.658 ns/op
# Warmup Iteration   3: 2398391.535 ns/op
# Warmup Iteration   4: 2350291.492 ns/op
# Warmup Iteration   5: 2311804.269 ns/op
Iteration   1: 2393378.440 ns/op
Iteration   2: 2288235.758 ns/op
Iteration   3: 2229176.555 ns/op
Iteration   4: 2246076.173 ns/op
Iteration   5: 2285064.870 ns/op


Result "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test1NewInline":
  2311987.557 ?99.9%) 93408.325 ns/op [Average]

  (min, avg, max) = (2036965.424, 2311987.557, 2541582.266), stdev = 124697.441
  CI (99.9%): [2218579.232, 2405395.881] (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.lang3.CharSequenceUtilsRegionMatchesTest.test1Old

# Run progress: 55.56% complete, ETA 00:33:32
# Fork: 1 of 5
# Warmup Iteration   1: 2377977.698 ns/op
# Warmup Iteration   2: 2515927.874 ns/op
# Warmup Iteration   3: 3044256.330 ns/op
# Warmup Iteration   4: 2434315.162 ns/op
# Warmup Iteration   5: 2527498.332 ns/op
Iteration   1: 2397003.954 ns/op
Iteration   2: 2444239.751 ns/op
Iteration   3: 3196526.782 ns/op
Iteration   4: 3386177.116 ns/op
Iteration   5: 2644706.346 ns/op

# Run progress: 57.78% complete, ETA 00:31:51
# Fork: 2 of 5
# Warmup Iteration   1: 2218181.973 ns/op
# Warmup Iteration   2: 2462817.286 ns/op
# Warmup Iteration   3: 2777060.011 ns/op
# Warmup Iteration   4: 2583705.346 ns/op
# Warmup Iteration   5: 2522079.224 ns/op
Iteration   1: 2617015.934 ns/op
Iteration   2: 2599625.318 ns/op
Iteration   3: 2654190.634 ns/op
Iteration   4: 2669915.724 ns/op
Iteration   5: 3110569.733 ns/op

# Run progress: 60.00% complete, ETA 00:30:10
# Fork: 3 of 5
# Warmup Iteration   1: 2617144.691 ns/op
# Warmup Iteration   2: 2737680.005 ns/op
# Warmup Iteration   3: 3009896.118 ns/op
# Warmup Iteration   4: 3206582.815 ns/op
# Warmup Iteration   5: 2605762.594 ns/op
Iteration   1: 2463134.622 ns/op
Iteration   2: 2765426.928 ns/op
Iteration   3: 2680298.419 ns/op
Iteration   4: 2581400.129 ns/op
Iteration   5: 2677096.607 ns/op

# Run progress: 62.22% complete, ETA 00:28:30
# Fork: 4 of 5
# Warmup Iteration   1: 2324112.105 ns/op
# Warmup Iteration   2: 2551025.325 ns/op
# Warmup Iteration   3: 2682065.755 ns/op
# Warmup Iteration   4: 3001461.626 ns/op
# Warmup Iteration   5: 2668335.342 ns/op
Iteration   1: 2696379.482 ns/op
Iteration   2: 2538083.760 ns/op
Iteration   3: 2625639.397 ns/op
Iteration   4: 2591854.366 ns/op
Iteration   5: 2648911.679 ns/op

# Run progress: 64.44% complete, ETA 00:26:49
# Fork: 5 of 5
# Warmup Iteration   1: 2276253.277 ns/op
# Warmup Iteration   2: 2493182.083 ns/op
# Warmup Iteration   3: 2604327.206 ns/op
# Warmup Iteration   4: 2706662.544 ns/op
# Warmup Iteration   5: 2580364.964 ns/op
Iteration   1: 2543079.507 ns/op
Iteration   2: 2736347.469 ns/op
Iteration   3: 3073357.051 ns/op
Iteration   4: 2620306.759 ns/op
Iteration   5: 2366617.605 ns/op


Result "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test1Old":
  2693116.203 ?99.9%) 185341.611 ns/op [Average]

  (min, avg, max) = (2366617.605, 2693116.203, 3386177.116), stdev = 247425.748
  CI (99.9%): [2507774.592, 2878457.814] (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.lang3.CharSequenceUtilsRegionMatchesTest.test2New

# Run progress: 66.67% complete, ETA 00:25:08
# Fork: 1 of 5
# Warmup Iteration   1: 4561011.126 ns/op
# Warmup Iteration   2: 4297673.368 ns/op
# Warmup Iteration   3: 5622793.479 ns/op
# Warmup Iteration   4: 6202398.140 ns/op
# Warmup Iteration   5: 5108787.538 ns/op
Iteration   1: 4777495.989 ns/op
Iteration   2: 4755649.358 ns/op
Iteration   3: 4939464.938 ns/op
Iteration   4: 4819075.481 ns/op
Iteration   5: 4960220.377 ns/op

# Run progress: 68.89% complete, ETA 00:23:28
# Fork: 2 of 5
# Warmup Iteration   1: 4433225.178 ns/op
# Warmup Iteration   2: 4266509.510 ns/op
# Warmup Iteration   3: 4723830.987 ns/op
# Warmup Iteration   4: 4823708.872 ns/op
# Warmup Iteration   5: 4789934.100 ns/op
Iteration   1: 4653393.439 ns/op
Iteration   2: 4540897.186 ns/op
Iteration   3: 4564782.154 ns/op
Iteration   4: 4788598.947 ns/op
Iteration   5: 4751541.330 ns/op

# Run progress: 71.11% complete, ETA 00:21:47
# Fork: 3 of 5
# Warmup Iteration   1: 4264341.219 ns/op
# Warmup Iteration   2: 4245952.603 ns/op
# Warmup Iteration   3: 4626748.751 ns/op
# Warmup Iteration   4: 4843764.116 ns/op
# Warmup Iteration   5: 5257025.118 ns/op
Iteration   1: 4538335.028 ns/op
Iteration   2: 4814007.988 ns/op
Iteration   3: 4794669.367 ns/op
Iteration   4: 4843054.695 ns/op
Iteration   5: 4829530.807 ns/op

# Run progress: 73.33% complete, ETA 00:20:07
# Fork: 4 of 5
# Warmup Iteration   1: 4389884.598 ns/op
# Warmup Iteration   2: 4329714.496 ns/op
# Warmup Iteration   3: 4817897.357 ns/op
# Warmup Iteration   4: 4976932.935 ns/op
# Warmup Iteration   5: 5080313.814 ns/op
Iteration   1: 5040700.252 ns/op
Iteration   2: 5027983.819 ns/op
Iteration   3: 5016002.056 ns/op
Iteration   4: 5502372.057 ns/op
Iteration   5: 5386916.532 ns/op

# Run progress: 75.56% complete, ETA 00:18:26
# Fork: 5 of 5
# Warmup Iteration   1: 4793346.551 ns/op
# Warmup Iteration   2: 4790998.851 ns/op
# Warmup Iteration   3: 5206477.876 ns/op
# Warmup Iteration   4: 5084307.063 ns/op
# Warmup Iteration   5: 5376581.784 ns/op
Iteration   1: 5089852.366 ns/op
Iteration   2: 5012025.050 ns/op
Iteration   3: 5033387.424 ns/op
Iteration   4: 5023582.380 ns/op
Iteration   5: 5301262.427 ns/op


Result "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test2New":
  4912192.058 ?99.9%) 182860.479 ns/op [Average]

  (min, avg, max) = (4538335.028, 4912192.058, 5502372.057), stdev = 244113.508
  CI (99.9%): [4729331.579, 5095052.537] (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.lang3.CharSequenceUtilsRegionMatchesTest.test2NewInline

# Run progress: 77.78% complete, ETA 00:16:45
# Fork: 1 of 5
# Warmup Iteration   1: 6812844.005 ns/op
# Warmup Iteration   2: 7361846.946 ns/op
# Warmup Iteration   3: 6314917.172 ns/op
# Warmup Iteration   4: 5514344.818 ns/op
# Warmup Iteration   5: 4573342.615 ns/op
Iteration   1: 4367346.769 ns/op
Iteration   2: 4196451.762 ns/op
Iteration   3: 4850605.771 ns/op
Iteration   4: 4700119.361 ns/op
Iteration   5: 4789465.055 ns/op

# Run progress: 80.00% complete, ETA 00:15:05
# Fork: 2 of 5
# Warmup Iteration   1: 6680681.976 ns/op
# Warmup Iteration   2: 6157972.492 ns/op
# Warmup Iteration   3: 6132428.571 ns/op
# Warmup Iteration   4: 5038364.904 ns/op
# Warmup Iteration   5: 4707730.400 ns/op
Iteration   1: 4383523.093 ns/op
Iteration   2: 4410385.317 ns/op
Iteration   3: 4616303.415 ns/op
Iteration   4: 4546104.045 ns/op
Iteration   5: 4652900.698 ns/op

# Run progress: 82.22% complete, ETA 00:13:24
# Fork: 3 of 5
# Warmup Iteration   1: 6452076.194 ns/op
# Warmup Iteration   2: 6240882.970 ns/op
# Warmup Iteration   3: 6404174.072 ns/op
# Warmup Iteration   4: 5725149.685 ns/op
# Warmup Iteration   5: 4811535.787 ns/op
Iteration   1: 4782619.751 ns/op
Iteration   2: 5031695.321 ns/op
Iteration   3: 4732139.877 ns/op
Iteration   4: 4436695.608 ns/op
Iteration   5: 4588490.459 ns/op

# Run progress: 84.44% complete, ETA 00:11:44
# Fork: 4 of 5
# Warmup Iteration   1: 6199606.011 ns/op
# Warmup Iteration   2: 6008727.868 ns/op
# Warmup Iteration   3: 6104671.142 ns/op
# Warmup Iteration   4: 4986448.604 ns/op
# Warmup Iteration   5: 4492854.852 ns/op
Iteration   1: 4941042.095 ns/op
Iteration   2: 4427786.012 ns/op
Iteration   3: 4169051.271 ns/op
Iteration   4: 4298162.226 ns/op
Iteration   5: 4471264.282 ns/op

# Run progress: 86.67% complete, ETA 00:10:03
# Fork: 5 of 5
# Warmup Iteration   1: 5940940.439 ns/op
# Warmup Iteration   2: 6073210.808 ns/op
# Warmup Iteration   3: 7042467.958 ns/op
# Warmup Iteration   4: 4998285.157 ns/op
# Warmup Iteration   5: 4120664.936 ns/op
Iteration   1: 4823124.892 ns/op
Iteration   2: 5203985.915 ns/op
Iteration   3: 4857779.650 ns/op
Iteration   4: 4612683.449 ns/op
Iteration   5: 4410548.633 ns/op


Result "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test2NewInline":
  4612010.989 ?99.9%) 195294.419 ns/op [Average]

  (min, avg, max) = (4169051.271, 4612010.989, 5203985.915), stdev = 260712.462
  CI (99.9%): [4416716.570, 4807305.408] (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.lang3.CharSequenceUtilsRegionMatchesTest.test2Old

# Run progress: 88.89% complete, ETA 00:08:23
# Fork: 1 of 5
# Warmup Iteration   1: 4386628.026 ns/op
# Warmup Iteration   2: 4409159.497 ns/op
# Warmup Iteration   3: 4697640.141 ns/op
# Warmup Iteration   4: 4999809.795 ns/op
# Warmup Iteration   5: 5404947.326 ns/op
Iteration   1: 5514192.007 ns/op
Iteration   2: 5602226.260 ns/op
Iteration   3: 5752275.043 ns/op
Iteration   4: 5652768.871 ns/op
Iteration   5: 6091266.626 ns/op

# Run progress: 91.11% complete, ETA 00:06:42
# Fork: 2 of 5
# Warmup Iteration   1: 5328853.797 ns/op
# Warmup Iteration   2: 4943080.435 ns/op
# Warmup Iteration   3: 5106661.001 ns/op
# Warmup Iteration   4: 5622510.512 ns/op
# Warmup Iteration   5: 6063115.758 ns/op
Iteration   1: 5690946.928 ns/op
Iteration   2: 5560430.795 ns/op
Iteration   3: 5356928.227 ns/op
Iteration   4: 5326942.972 ns/op
Iteration   5: 5689312.799 ns/op

# Run progress: 93.33% complete, ETA 00:05:01
# Fork: 3 of 5
# Warmup Iteration   1: 5078255.787 ns/op
# Warmup Iteration   2: 4970025.633 ns/op
# Warmup Iteration   3: 4841656.147 ns/op
# Warmup Iteration   4: 5353851.338 ns/op
# Warmup Iteration   5: 5602909.580 ns/op
Iteration   1: 6098516.890 ns/op
Iteration   2: 5834075.743 ns/op
Iteration   3: 6132902.818 ns/op
Iteration   4: 5757714.105 ns/op
Iteration   5: 5581881.306 ns/op

# Run progress: 95.56% complete, ETA 00:03:21
# Fork: 4 of 5
# Warmup Iteration   1: 5151991.349 ns/op
# Warmup Iteration   2: 5046963.169 ns/op
# Warmup Iteration   3: 5166201.394 ns/op
# Warmup Iteration   4: 5914769.426 ns/op
# Warmup Iteration   5: 5724368.879 ns/op
Iteration   1: 5365006.166 ns/op
Iteration   2: 5477824.589 ns/op
Iteration   3: 6803552.617 ns/op
Iteration   4: 6591224.737 ns/op
Iteration   5: 5230821.234 ns/op

# Run progress: 97.78% complete, ETA 00:01:40
# Fork: 5 of 5
# Warmup Iteration   1: 5601439.082 ns/op
# Warmup Iteration   2: 6338512.738 ns/op
# Warmup Iteration   3: 5459651.937 ns/op
# Warmup Iteration   4: 5780962.312 ns/op
# Warmup Iteration   5: 5802922.389 ns/op
Iteration   1: 5515205.402 ns/op
Iteration   2: 5841633.334 ns/op
Iteration   3: 5248565.792 ns/op
Iteration   4: 5204489.646 ns/op
Iteration   5: 5265761.895 ns/op


Result "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test2Old":
  5687458.672 ?99.9%) 303590.959 ns/op [Average]

  (min, avg, max) = (5204489.646, 5687458.672, 6803552.617), stdev = 405285.244
  CI (99.9%): [5383867.713, 5991049.631] (assumes normal distribution)


# Run complete. Total time: 01:15:27

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
CharSequenceUtilsRegionMatchesTest.test0New        avgt   25  2455031.505 ? 82596.431  ns/op

CharSequenceUtilsRegionMatchesTest.test0NewInline  avgt   25  2210111.711 ? 61020.046  ns/op

CharSequenceUtilsRegionMatchesTest.test0Old        avgt   25  2676355.399 ?113788.180  ns/op

CharSequenceUtilsRegionMatchesTest.test1New        avgt   25  2203384.443 ?100739.661  ns/op

CharSequenceUtilsRegionMatchesTest.test1NewInline  avgt   25  2311987.557 ? 93408.325  ns/op

CharSequenceUtilsRegionMatchesTest.test1Old        avgt   25  2693116.203 ?185341.611  ns/op

CharSequenceUtilsRegionMatchesTest.test2New        avgt   25  4912192.058 ?182860.479  ns/op

CharSequenceUtilsRegionMatchesTest.test2NewInline  avgt   25  4612010.989 ?195294.419  ns/op

CharSequenceUtilsRegionMatchesTest.test2Old        avgt   25  5687458.672 ?303590.959  ns/op


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

XenoAmess avatar Jun 05 '20 14:06 XenoAmess

result json:

[
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test0New",
        "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" : "10 s",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "10 s",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 2455031.50487269,
            "scoreError" : 82596.43118906298,
            "scoreConfidence" : [
                2372435.073683627,
                2537627.936061753
            ],
            "scorePercentiles" : {
                "0.0" : 2299801.7932858127,
                "50.0" : 2442310.061050061,
                "90.0" : 2638215.5304203783,
                "95.0" : 2652540.041246207,
                "99.0" : 2653839.453435925,
                "99.9" : 2653839.453435925,
                "99.99" : 2653839.453435925,
                "99.999" : 2653839.453435925,
                "99.9999" : 2653839.453435925,
                "100.0" : 2653839.453435925
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    2461469.0622692592,
                    2442310.061050061,
                    2427010.385828682,
                    2421185.7661583154,
                    2419471.335268505
                ],
                [
                    2451503.3578431373,
                    2598355.2091452326,
                    2466372.503082614,
                    2653839.453435925,
                    2618707.4083769633
                ],
                [
                    2476611.1906412477,
                    2419733.68037745,
                    2508645.0714823175,
                    2410321.065075922,
                    2649508.0794701986
                ],
                [
                    2305189.6752707995,
                    2347030.7604411077,
                    2299801.7932858127,
                    2322225.214766659,
                    2303393.0234860694
                ],
                [
                    2320520.784040826,
                    2630687.1643871646,
                    2464871.97044335,
                    2541760.457433291,
                    2415263.148756339
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test0NewInline",
        "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" : "10 s",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "10 s",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 2210111.711287217,
            "scoreError" : 61020.04598156867,
            "scoreConfidence" : [
                2149091.6653056485,
                2271131.757268786
            ],
            "scorePercentiles" : {
                "0.0" : 2087501.3358380296,
                "50.0" : 2180778.613472858,
                "90.0" : 2341613.3640486645,
                "95.0" : 2410693.9690793087,
                "99.0" : 2411927.9893924785,
                "99.9" : 2411927.9893924785,
                "99.99" : 2411927.9893924785,
                "99.999" : 2411927.9893924785,
                "99.9999" : 2411927.9893924785,
                "100.0" : 2411927.9893924785
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    2297479.214515388,
                    2144106.193527647,
                    2131691.6240409208,
                    2154484.8589274175,
                    2087501.3358380296
                ],
                [
                    2407814.5883485796,
                    2256505.0541516244,
                    2270761.4301929628,
                    2174536.7389130434,
                    2127787.513082323
                ],
                [
                    2268659.4692674074,
                    2254443.9134355276,
                    2252960.8918675375,
                    2146608.048722902,
                    2229433.987073769
                ],
                [
                    2173373.9680573666,
                    2195027.7436347674,
                    2163932.0640415405,
                    2180778.613472858,
                    2128450.2768085105
                ],
                [
                    2155641.1855603447,
                    2220715.7859680285,
                    2168189.141742523,
                    2249981.151596941,
                    2411927.9893924785
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test0Old",
        "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" : "10 s",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "10 s",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 2676355.399319096,
            "scoreError" : 113788.18039888989,
            "scoreConfidence" : [
                2562567.218920206,
                2790143.579717986
            ],
            "scorePercentiles" : {
                "0.0" : 2435692.912810521,
                "50.0" : 2630008.6508019986,
                "90.0" : 2954509.5897849924,
                "95.0" : 2983894.357960863,
                "99.0" : 2995338.5931137726,
                "99.9" : 2995338.5931137726,
                "99.99" : 2995338.5931137726,
                "99.999" : 2995338.5931137726,
                "99.9999" : 2995338.5931137726,
                "100.0" : 2995338.5931137726
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    2781533.4816462738,
                    2515891.9245283017,
                    2708546.547793122,
                    2593129.9974073116,
                    2536440.907938118
                ],
                [
                    2435692.912810521,
                    2521154.0322580645,
                    2576613.5497166407,
                    2853638.7731811698,
                    2995338.5931137726
                ],
                [
                    2687993.3617307176,
                    2636774.4004745586,
                    2612644.514106583,
                    2619855.8666841276,
                    2952721.8879056047
                ],
                [
                    2774529.0155339804,
                    2701584.6566720693,
                    2613871.3091194145,
                    2692790.072370191,
                    2606149.244398124
                ],
                [
                    2460663.3948339485,
                    2603987.2791363164,
                    2840139.4662123793,
                    2630008.6508019986,
                    2957191.1426040744
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test1New",
        "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" : "10 s",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "10 s",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 2203384.442635681,
            "scoreError" : 100739.6606883907,
            "scoreConfidence" : [
                2102644.7819472905,
                2304124.1033240715
            ],
            "scorePercentiles" : {
                "0.0" : 2040438.0660954711,
                "50.0" : 2182479.598298058,
                "90.0" : 2384266.836965033,
                "95.0" : 2444819.9149268446,
                "99.0" : 2466840.8384710234,
                "99.9" : 2466840.8384710234,
                "99.99" : 2466840.8384710234,
                "99.999" : 2466840.8384710234,
                "99.9999" : 2466840.8384710234,
                "100.0" : 2466840.8384710234
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    2054070.8829568787,
                    2040438.0660954711,
                    2069738.154355473,
                    2103957.0677324357,
                    2182479.598298058
                ],
                [
                    2051590.5457342083,
                    2069987.5,
                    2150056.1906706793,
                    2330735.2598461895,
                    2466840.8384710234
                ],
                [
                    2100434.250104998,
                    2097353.0301950094,
                    2133263.0759385666,
                    2048687.3002867678,
                    2046222.9746317512
                ],
                [
                    2218060.9534368073,
                    2364284.991964075,
                    2330102.9261495587,
                    2323436.748199768,
                    2283122.194343066
                ],
                [
                    2378152.8882814357,
                    2233180.3083277517,
                    2298024.305306685,
                    2316953.2545749363,
                    2393437.759990428
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test1NewInline",
        "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" : "10 s",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "10 s",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 2311987.55652634,
            "scoreError" : 93408.32451619621,
            "scoreConfidence" : [
                2218579.232010144,
                2405395.8810425363
            ],
            "scorePercentiles" : {
                "0.0" : 2036965.4243534922,
                "50.0" : 2288235.758407687,
                "90.0" : 2475674.286174553,
                "95.0" : 2522663.117802781,
                "99.0" : 2541582.2660060977,
                "99.9" : 2541582.2660060977,
                "99.99" : 2541582.2660060977,
                "99.999" : 2541582.2660060977,
                "99.9999" : 2541582.2660060977,
                "100.0" : 2541582.2660060977
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    2300172.631094756,
                    2280273.985636115,
                    2415869.747292419,
                    2458107.8397640698,
                    2473778.184516448
                ],
                [
                    2187909.5821483266,
                    2241326.798117858,
                    2253805.9258675077,
                    2202241.268443074,
                    2415944.4444444445
                ],
                [
                    2055118.2453256627,
                    2036965.4243534922,
                    2273757.3994089565,
                    2289730.2655677656,
                    2268470.1178069776
                ],
                [
                    2380796.239885769,
                    2478518.43866171,
                    2541582.2660060977,
                    2426567.661329452,
                    2376820.651378327
                ],
                [
                    2393378.4398181383,
                    2288235.758407687,
                    2229176.554713617,
                    2246076.17336627,
                    2285064.869803563
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test1Old",
        "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" : "10 s",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "10 s",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 2693116.202878769,
            "scoreError" : 185341.61093890833,
            "scoreConfidence" : [
                2507774.5919398605,
                2878457.8138176776
            ],
            "scorePercentiles" : {
                "0.0" : 2366617.6053005205,
                "50.0" : 2644706.3458487573,
                "90.0" : 3144952.5523397173,
                "95.0" : 3329282.0155584738,
                "99.0" : 3386177.11577522,
                "99.9" : 3386177.11577522,
                "99.99" : 3386177.11577522,
                "99.999" : 3386177.11577522,
                "99.9999" : 3386177.11577522,
                "100.0" : 3386177.11577522
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    2397003.953989935,
                    2444239.7507940386,
                    3196526.781719399,
                    3386177.11577522,
                    2644706.3458487573
                ],
                [
                    2617015.9340659343,
                    2599625.3184299455,
                    2654190.6341204564,
                    2669915.7237052857,
                    3110569.732753263
                ],
                [
                    2463134.6217680373,
                    2765426.928117224,
                    2680298.419078242,
                    2581400.1287741936,
                    2677096.6072668983
                ],
                [
                    2696379.4823402534,
                    2538083.7604668867,
                    2625639.3965879264,
                    2591854.3661570353,
                    2648911.6790254237
                ],
                [
                    2543079.506737859,
                    2736347.469220246,
                    3073357.050691244,
                    2620306.759235001,
                    2366617.6053005205
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test2New",
        "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" : "10 s",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "10 s",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 4912192.0578202745,
            "scoreError" : 182860.47899695748,
            "scoreConfidence" : [
                4729331.578823317,
                5095052.536817232
            ],
            "scorePercentiles" : {
                "0.0" : 4538335.027676951,
                "50.0" : 4843054.695062923,
                "90.0" : 5335524.06909618,
                "95.0" : 5467735.399271244,
                "99.0" : 5502372.056655666,
                "99.9" : 5502372.056655666,
                "99.99" : 5502372.056655666,
                "99.999" : 5502372.056655666,
                "99.9999" : 5502372.056655666,
                "100.0" : 5502372.056655666
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    4777495.9885386815,
                    4755649.358059915,
                    4939464.937777778,
                    4819075.481213873,
                    4960220.376797223
                ],
                [
                    4653393.4388087485,
                    4540897.185655924,
                    4564782.153811045,
                    4788598.946864529,
                    4751541.330166271
                ],
                [
                    4538335.027676951,
                    4814007.988450433,
                    4794669.367209971,
                    4843054.695062923,
                    4829530.806856591
                ],
                [
                    5040700.251889169,
                    5027983.819095477,
                    5016002.055667001,
                    5502372.056655666,
                    5386916.532040927
                ],
                [
                    5089852.366412214,
                    5012025.050100201,
                    5033387.424044265,
                    5023582.379518072,
                    5301262.427133015
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test2NewInline",
        "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" : "10 s",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "10 s",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 4612010.989062521,
            "scoreError" : 195294.41867632593,
            "scoreConfidence" : [
                4416716.570386195,
                4807305.407738847
            ],
            "scorePercentiles" : {
                "0.0" : 4169051.271363068,
                "50.0" : 4612683.448593822,
                "90.0" : 4977303.385488424,
                "95.0" : 5152298.736615004,
                "99.0" : 5203985.914552046,
                "99.9" : 5203985.914552046,
                "99.99" : 5203985.914552046,
                "99.999" : 5203985.914552046,
                "99.9999" : 5203985.914552046,
                "100.0" : 5203985.914552046
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    4367346.768558952,
                    4196451.761744967,
                    4850605.771096024,
                    4700119.360902255,
                    4789465.055050263
                ],
                [
                    4383523.093339176,
                    4410385.317460317,
                    4616303.414859252,
                    4546104.045454546,
                    4652900.697674419
                ],
                [
                    4782619.75083692,
                    5031695.321428572,
                    4732139.877010407,
                    4436695.60780834,
                    4588490.458715596
                ],
                [
                    4941042.09486166,
                    4427786.011952192,
                    4169051.271363068,
                    4298162.226042114,
                    4471264.2820742065
                ],
                [
                    4823124.892152143,
                    5203985.914552046,
                    4857779.650315687,
                    4612683.448593822,
                    4410548.632716049
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    },
    {
        "jmhVersion" : "1.21",
        "benchmark" : "org.apache.commons.lang3.CharSequenceUtilsRegionMatchesTest.test2Old",
        "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" : "10 s",
        "warmupBatchSize" : 1,
        "measurementIterations" : 5,
        "measurementTime" : "10 s",
        "measurementBatchSize" : 1,
        "primaryMetric" : {
            "score" : 5687458.672038524,
            "scoreError" : 303590.95872998436,
            "scoreConfidence" : [
                5383867.71330854,
                5991049.630768509
            ],
            "scorePercentiles" : {
                "0.0" : 5204489.646201873,
                "50.0" : 5602226.259798433,
                "90.0" : 6316231.585545665,
                "95.0" : 6739854.253139647,
                "99.0" : 6803552.617267165,
                "99.9" : 6803552.617267165,
                "99.99" : 6803552.617267165,
                "99.999" : 6803552.617267165,
                "99.9999" : 6803552.617267165,
                "100.0" : 6803552.617267165
            },
            "scoreUnit" : "ns/op",
            "rawData" : [
                [
                    5514192.006615215,
                    5602226.259798433,
                    5752275.043128234,
                    5652768.870621469,
                    6091266.626065774
                ],
                [
                    5690946.927758817,
                    5560430.794886048,
                    5356928.226566684,
                    5326942.971778488,
                    5689312.798634812
                ],
                [
                    6098516.890243903,
                    5834075.742857143,
                    6132902.818014706,
                    5757714.104778353,
                    5581881.305803572
                ],
                [
                    5365006.165683646,
                    5477824.589266156,
                    6803552.617267165,
                    6591224.736842105,
                    5230821.234309623
                ],
                [
                    5515205.402425579,
                    5841633.333917105,
                    5248565.792235048,
                    5204489.646201873,
                    5265761.895263158
                ]
            ]
        },
        "secondaryMetrics" : {
        }
    }
]

XenoAmess avatar Jun 05 '20 14:06 XenoAmess

I have no idea why the travis-ci got "pending" here(for several days already). I will try to retrigger it, using some force-push things. ---------- done.

XenoAmess avatar Jun 13 '20 18:06 XenoAmess

@garydgregory rebased. please find some time to review. thanks.

XenoAmess avatar Feb 21 '21 16:02 XenoAmess