Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve performance of StringUtils.capitalize() [SPR-15094] #19661

Closed
spring-issuemaster opened this issue Jan 4, 2017 · 0 comments

Comments

@spring-issuemaster
Copy link
Collaborator

commented Jan 4, 2017

Christoph Dreis opened SPR-15094 and commented

Hey,

just noticed a small possible improvement for (un-)capitalizing Strings. Using substring is rather expensive and we could avoid that. Please find my proposal attached.

|Benchmark|Mode|Cnt|Score|Error|Units|
|:---|
|MyBenchmark.testNew|thrpt|20|24027358,674|± 519677,096|ops/s|
|MyBenchmark.testOld|thrpt|20|16391178,671|± 378698,464|ops/s|

If no work has to be done I saw possible improvements of factor 20.

Cheers,
Christoph


Affects: 4.3.5

Referenced from: pull request #1285, and commits 31f7860, 83929b2, 5982f73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.