You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "orpiske (via GitHub)" <gi...@apache.org> on 2023/08/16 20:02:29 UTC
[GitHub] [camel] orpiske opened a new pull request, #11125: (chores) camel-util: micro-optimizations to StringHelper
orpiske opened a new pull request, #11125:
URL: https://github.com/apache/camel/pull/11125
While cleaning up my performance test scripts, I was playing with StringHelper micro-optimizations and I came up with a few improvements. Of course, they are almost irrelevant on the big picture, but since they are so small and non-intrusive, I think they are worth it.
Camel 4.0.0:
```
Benchmark Mode Cnt Score Error Units
StringHelperTest.testIsClassNameNegative avgt 10 0.034 ± 0.001 us/op
StringHelperTest.testIsClassNamePositive avgt 10 0.308 ± 0.001 us/op
StringHelperTest.testRemoveLeadingAndEndingQuotes avgt 10 0.037 ± 0.001 us/op
StringHelperTest.testRemoveQuotes avgt 10 0.098 ± 0.001 us/op
StringHelperTest.testXmlEncode avgt 10 0.170 ± 0.001 us/op
```
Camel 4.1.0-SNAPSHOT
```
Benchmark Mode Cnt Score Error Units
StringHelperTest.testIsClassNameNegative avgt 10 0.020 ± 0.001 us/op
StringHelperTest.testIsClassNamePositive avgt 10 0.011 ± 0.001 us/op
StringHelperTest.testRemoveLeadingAndEndingQuotes avgt 10 0.037 ± 0.001 us/op
StringHelperTest.testRemoveQuotes avgt 10 0.095 ± 0.001 us/op
StringHelperTest.testXmlEncode avgt 10 0.165 ± 0.001 us/op
```
The biggest benefit seems to be on the `isClassName` which brings a 14us improvement for negative cases and 297us (~27 times faster) for the positive case.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] orpiske merged pull request #11125: (chores) camel-util: micro-optimizations to StringHelper
Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske merged PR #11125:
URL: https://github.com/apache/camel/pull/11125
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel] github-actions[bot] commented on pull request #11125: (chores) camel-util: micro-optimizations to StringHelper
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #11125:
URL: https://github.com/apache/camel/pull/11125#issuecomment-1681199236
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:camel: Maintainers, please note that first-time contributors *require manual approval* for the GitHub Actions to run.
:warning: Please note that the changes on this PR may be **tested automatically** if they change components.
:robot: Use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot.
If necessary Apache Camel Committers may access logs and test results in the job summaries!
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org