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

Speed up FakeValues#toJavaNames #579

Merged
merged 1 commit into from
Dec 23, 2022
Merged

Conversation

snuyanzin
Copy link
Collaborator

Usage of array instead of StringBuilder speeds up more than 2 times
before

Benchmark                Mode  Cnt      Score     Error   Units
ToJavaName.toJavaName2  thrpt   10  21737.634 ± 552.641  ops/ms

after

Benchmark                Mode  Cnt      Score     Error   Units
ToJavaName.toJavaName   thrpt   10  57957.671 ± 783.179  ops/ms

@codecov-commenter
Copy link

Codecov Report

Merging #579 (1f648b2) into main (6930ebe) will increase coverage by 0.05%.
The diff coverage is 82.35%.

@@             Coverage Diff              @@
##               main     #579      +/-   ##
============================================
+ Coverage     92.43%   92.48%   +0.05%     
- Complexity     2427     2431       +4     
============================================
  Files           252      252              
  Lines          5090     5099       +9     
  Branches        556      560       +4     
============================================
+ Hits           4705     4716      +11     
+ Misses          250      249       -1     
+ Partials        135      134       -1     
Impacted Files Coverage Δ
...rc/main/java/net/datafaker/service/FakeValues.java 82.72% <82.35%> (+0.54%) ⬆️
.../java/net/datafaker/service/FakeValuesService.java 86.30% <0.00%> (+0.20%) ⬆️
...ker/idnumbers/pt/br/IdNumberGeneratorPtBrUtil.java 96.29% <0.00%> (+3.70%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@snuyanzin snuyanzin merged commit 2e96510 into datafaker-net:main Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants