Skip to content

Use cast to char instead of Math.abs, use value of first symbols for hashcode#531

Merged
snuyanzin merged 1 commit into
datafaker-net:mainfrom
snuyanzin:hashcode
Nov 6, 2022
Merged

Use cast to char instead of Math.abs, use value of first symbols for hashcode#531
snuyanzin merged 1 commit into
datafaker-net:mainfrom
snuyanzin:hashcode

Conversation

@snuyanzin
Copy link
Copy Markdown
Collaborator

A bit more speed up for net.datafaker.providers.base.Text#text(net.datafaker.providers.base.Text.TextRuleConfig)
before

Benchmark                        Mode  Cnt     Score     Error   Units
DatafakerSimpleMethods.text10   thrpt   10  4360.216 ± 529.892  ops/ms
DatafakerSimpleMethods.text100  thrpt   10   895.668 ±  98.985  ops/ms

after

Benchmark                        Mode  Cnt     Score      Error   Units
DatafakerSimpleMethods.text10   thrpt   10  4997.986 ± 1148.652  ops/ms
DatafakerSimpleMethods.text100  thrpt   10  1168.288 ±  155.656  ops/ms

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 6, 2022

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.93%. Comparing base (fd8e32b) to head (e17aed9).
Report is 1198 commits behind head on main.

Files with missing lines Patch % Lines
...c/main/java/net/datafaker/providers/base/Text.java 83.33% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #531      +/-   ##
============================================
+ Coverage     91.87%   91.93%   +0.06%     
- Complexity     2358     2360       +2     
============================================
  Files           247      247              
  Lines          4947     4947              
  Branches        530      530              
============================================
+ Hits           4545     4548       +3     
+ Misses          273      268       -5     
- Partials        129      131       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@snuyanzin snuyanzin merged commit ac4ba2e into datafaker-net:main Nov 6, 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