[GitHub] [commons-lang] XenoAmess commented on pull request #534: [LANG-1548] split regionMatches for better performance

2021-02-21 Thread GitBox


XenoAmess commented on pull request #534:
URL: https://github.com/apache/commons-lang/pull/534#issuecomment-782882822


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



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:
us...@infra.apache.org




[GitHub] [commons-lang] XenoAmess commented on pull request #534: [LANG-1548] split regionMatches for better performance

2020-06-13 Thread GitBox


XenoAmess commented on pull request #534:
URL: https://github.com/apache/commons-lang/pull/534#issuecomment-643661277


   I have no idea why the travis-ci got "pending" here.
   I will try to retrigger it.



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:
us...@infra.apache.org




[GitHub] [commons-lang] XenoAmess commented on pull request #534: [LANG-1548] split regionMatches for better performance

2020-06-05 Thread GitBox


XenoAmess commented on pull request #534:
URL: https://github.com/apache/commons-lang/pull/534#issuecomment-639538491


   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." : 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,
   235.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." : 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,
  

[GitHub] [commons-lang] XenoAmess commented on pull request #534: [LANG-1548] split regionMatches for better performance

2020-06-05 Thread GitBox


XenoAmess commented on pull request #534:
URL: https://github.com/apache/commons-lang/pull/534#issuecomment-639537791


   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: 
   # 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: 235.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: 
   # 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 

[GitHub] [commons-lang] XenoAmess commented on pull request #534: [LANG-1548] split regionMatches for better performance

2020-06-01 Thread GitBox


XenoAmess commented on pull request #534:
URL: https://github.com/apache/commons-lang/pull/534#issuecomment-637236609


   ```
   [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: 
   # 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: 
   # 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
 

[GitHub] [commons-lang] XenoAmess commented on pull request #534: [LANG-1548] split regionMatches for better performance

2020-06-01 Thread GitBox


XenoAmess commented on pull request #534:
URL: https://github.com/apache/commons-lang/pull/534#issuecomment-636959596


   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.



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:
us...@infra.apache.org




[GitHub] [commons-lang] XenoAmess commented on pull request #534: [LANG-1548] split regionMatches for better performance

2020-05-31 Thread GitBox


XenoAmess commented on pull request #534:
URL: https://github.com/apache/commons-lang/pull/534#issuecomment-636539583


   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.
   



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:
us...@infra.apache.org