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

2020-06-13 Thread GitBox


XenoAmess edited a comment 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(for several days 
already).
   I will try to retrigger it, using some force-push things.



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 edited a comment on pull request #534: [LANG-1548] split regionMatches for better performance

2020-06-13 Thread GitBox


XenoAmess edited a comment 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(for several days 
already).
   I will try to retrigger it, using some force-push things.
   `--`
   done.



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 edited a comment on pull request #534: [LANG-1548] split regionMatches for better performance

2020-06-01 Thread GitBox


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


   @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: 
   # 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
   

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

2020-06-01 Thread GitBox


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


   solution:
   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: 
   # 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 

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

2020-06-01 Thread GitBox


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


   @garydgregory 
   
   solution:
   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: 
   # 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   

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

2020-06-01 Thread GitBox


XenoAmess edited a comment 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 edited a comment on pull request #534: [LANG-1548] split regionMatches for better performance

2020-05-31 Thread GitBox


XenoAmess edited a comment 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