You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2020/07/29 07:59:01 UTC
[GitHub] [commons-lang] XenoAmess commented on pull request #574: [LANG-1585] refine performance of StringUtils.normalizeSpace
XenoAmess commented on pull request #574:
URL: https://github.com/apache/commons-lang/pull/574#issuecomment-665137439
refined the tests.
full jmh test at: https://pastebin.ubuntu.com/p/FhWRhHx6v6/
in short:
```
Benchmark Mode Cnt Score Error Units
StringUtilsNormalizeSpaceTest.testNew avgt 5 1732.831 ?127.293 ns/op
StringUtilsNormalizeSpaceTest.testNew2 avgt 5 437.049 ? 29.495 ns/op
StringUtilsNormalizeSpaceTest.testOld avgt 5 574.871 ? 46.116 ns/op
```
indicates:
New, New2, Old is 3 version of a same function.
we of course should choose the fastest one, means New2 here.
----------------------------------------------------------------
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