[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-dev
Subject:    [GitHub] [commons-lang] nstdio opened a new pull request #496: Avoid unnecessary allocation in wrapI
From:       GitBox <git () apache ! org>
Date:       2020-02-29 14:14:04
Message-ID: infra.496.MDExOlB1bGxSZXF1ZXN0MzgxODU2Nzk3.gitbox () gitbox ! apache ! org
[Download RAW message or body]

nstdio opened a new pull request #496: Avoid unnecessary allocation in wrapIfMissing.
URL: https://github.com/apache/commons-lang/pull/496
 
 
   Now `StringUtils#wrapIfMissing(String, char)` and \
`StringUtils#wrapIfMissing(String, String)` does not allocate buffer when input is \
already wrapped.  
   Here are the benchmark results on my machine:
   
   ```
   Benchmark                    (input)   Mode  Samples    Score  Score error   Units
   optimized    /should not be wrapped/  thrpt       20  357.849        4.525  ops/us
   optimized          should be wrapped  thrpt       20   33.779        0.246  ops/us
   original     /should not be wrapped/  thrpt       20   35.581        0.236  ops/us
   original           should be wrapped  thrpt       20   33.671        0.360  ops/us
   ```

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


With regards,
Apache Git Services


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic