theigl opened a new pull request #455:
URL: https://github.com/apache/wicket/pull/455


   This is another small PR that significantly improves a "hot" method. 
   
   Replacing `startsWith` and `endsWith` with `charAt` improves throughput by a 
factor of 3. It also prevents allocating a new String for non-placeholder 
segments because it does not use concatenation.
   
   Benchmark    |                      Mode |  Cnt    |      Score     |      
Units
   ------------ | ------------- |  ------------- |  --: | -------------
   MapperBenchmarks.getPlaceholderNew | thrpt  |  3 | `406808071,934` |  ops/s
   MapperBenchmarks.getPlaceholderOld | thrpt  |  3  |    `132832411,311` |  
ops/s
   
   https://issues.apache.org/jira/browse/WICKET-6835


----------------------------------------------------------------
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


Reply via email to