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

div: Optimize udivrem_byN() #141

Merged
merged 2 commits into from
Jun 13, 2020
Merged

div: Optimize udivrem_byN() #141

merged 2 commits into from
Jun 13, 2020

Conversation

chfast
Copy link
Owner

@chfast chfast commented Jun 13, 2020

This improves GCC10 build:

div<uint256, udivrem>/64_mean                   +0.0148         +0.0148            25            25            25            25
div<uint256, udivrem>/128_mean                  -0.0688         -0.0688            32            29            32            29
div<uint256, udivrem>/192_mean                  -0.0184         -0.0184            36            35            36            35
div<uint256, udivrem>/256_mean                  -0.0061         -0.0061            32            32            32            32
div<uint512, udivrem>/64_mean                   -0.0880         -0.0880            43            39            43            39
div<uint512, udivrem>/128_mean                  -0.1567         -0.1567            58            49            58            49
div<uint512, udivrem>/192_mean                  -0.0432         -0.0432            81            77            81            77
div<uint512, udivrem>/256_mean                  -0.0063         -0.0063            78            77            78            77                                                        

@chfast chfast force-pushed the div_by2_opt branch 2 times, most recently from 838ea19 to a3aa2eb Compare June 13, 2020 17:37
Use iterator and do-while loop.
@codecov-commenter
Copy link

codecov-commenter commented Jun 13, 2020

Codecov Report

Merging #141 into master will increase coverage by 0.12%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #141      +/-   ##
==========================================
+ Coverage   65.75%   65.88%   +0.12%     
==========================================
  Files          10       10              
  Lines         549      551       +2     
  Branches       51       49       -2     
==========================================
+ Hits          361      363       +2     
  Misses        188      188              

@chfast chfast changed the title div: Optimize udivrem_by2() a bit div: Optimize udivrem_byN() Jun 13, 2020
Use iterator and do-while loop.
@chfast chfast merged commit 1537236 into master Jun 13, 2020
@chfast chfast deleted the div_by2_opt branch June 13, 2020 20:33
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