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

Division improvements #99

Merged
merged 10 commits into from
Jun 13, 2019
Merged

Division improvements #99

merged 10 commits into from
Jun 13, 2019

Conversation

chfast
Copy link
Owner

@chfast chfast commented Jun 12, 2019

This makes 256-bit division ~40% faster and 512-bit division ~10% slower.

Benchmark                                   Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------
udiv<uint256, uint32_t, udivrem>         -0.4528         -0.4528         56945         31162         56945         31162
udiv<uint256, uint64_t, udivrem>         -0.3995         -0.3995         55146         33118         55145         33117
udiv<uint256, uint128, udivrem>          -0.4197         -0.4198         58186         33763         58186         33762
udiv<uint256, uint256, udivrem>          -0.0868         -0.0869         37118         33894         37117         33893
udiv<uint512, uint32_t, udivrem>         +0.0660         +0.0660         56905         60663         56905         60662
udiv<uint512, uint64_t, udivrem>         +0.0833         +0.0833         55982         60648         55982         60647
udiv<uint512, uint256, udivrem>          -0.0463         -0.0463         97535         93020         97533         93018

@codecov-io
Copy link

codecov-io commented Jun 12, 2019

Codecov Report

Merging #99 into master will increase coverage by 2.61%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #99      +/-   ##
==========================================
+ Coverage   71.08%   73.69%   +2.61%     
==========================================
  Files           8        8              
  Lines        1349     1346       -3     
  Branches      162      158       -4     
==========================================
+ Hits          959      992      +33     
+ Misses        342      306      -36     
  Partials       48       48

@chfast chfast merged commit 80c527d into master Jun 13, 2019
@chfast chfast deleted the div branch June 13, 2019 15:42
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