-
Notifications
You must be signed in to change notification settings - Fork 161
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
Compute modular inverses of integers faster #2053
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fingolfin
added
topic: kernel
topic: performance
bugs or enhancements related to performance (improvements or regressions)
kind: enhancement
Label for issues suggesting enhancements; and for pull requests implementing enhancements
labels
Dec 28, 2017
fingolfin
force-pushed
the
mh/integer
branch
2 times, most recently
from
January 4, 2018 11:24
3fc7feb
to
46cd6d0
Compare
Codecov Report
@@ Coverage Diff @@
## master #2053 +/- ##
==========================================
- Coverage 67.03% 67.03% -0.01%
==========================================
Files 899 899
Lines 273551 273554 +3
==========================================
- Hits 183380 183370 -10
- Misses 90171 90184 +13
|
fingolfin
force-pushed
the
mh/integer
branch
2 times, most recently
from
January 7, 2018 19:57
2d44975
to
72926c4
Compare
ChrisJefferson
approved these changes
Jan 8, 2018
Before (on a 64 bit machine): gap> q:=3;;n:=7;; for i in [1..2000000] do INVMODINT(q,n); od; time; 360 gap> q:=3;;n:=2^59;; for i in [1..2000000] do INVMODINT(q,n); od; time; 350 gap> q:=3;;n:=2^60;; for i in [1..2000000] do INVMODINT(q,n); od; time; 373 gap> q:=3^60;;n:=7;; for i in [1..2000000] do INVMODINT(q,n); od; time; 380 gap> q:=3^60;;n:=2^59;; for i in [1..2000000] do INVMODINT(q,n); od; time; 1234 gap> q:=3^60;;n:=2^60;; for i in [1..2000000] do INVMODINT(q,n); od; time; 1256 gap> q:=2^6000;;n:=3^6000;; for i in [1..6000] do INVMODINT(q,n); od; time; 637 After: gap> q:=3;;n:=7;; for i in [1..2000000] do INVMODINT(q,n); od; time; 222 gap> q:=3;;n:=2^59;; for i in [1..2000000] do INVMODINT(q,n); od; time; 219 gap> q:=3;;n:=2^60;; for i in [1..2000000] do INVMODINT(q,n); od; time; 350 gap> q:=3^60;;n:=7;; for i in [1..2000000] do INVMODINT(q,n); od; time; 205 gap> q:=3^60;;n:=2^59;; for i in [1..2000000] do INVMODINT(q,n); od; time; 1193 gap> q:=3^60;;n:=2^60;; for i in [1..2000000] do INVMODINT(q,n); od; time; 1257 gap> q:=2^6000;;n:=3^6000;; for i in [1..6000] do INVMODINT(q,n); od; time; 653
Before (on a 64 bit machine): gap> q:=1/3;;n:=7;; for i in [1..2000000] do x:= q mod n; od; time; 258 gap> q:=1/3;;n:=2^59;; for i in [1..2000000] do x:= q mod n; od; time; 295 gap> q:=1/3;;n:=2^60;; for i in [1..2000000] do x:= q mod n; od; time; 569 gap> q:=1/3^60;;n:=7;; for i in [1..2000000] do x:= q mod n; od; time; 537 gap> q:=1/3^60;;n:=2^59;; for i in [1..2000000] do x:= q mod n; od; time; 2364 gap> q:=1/3^60;;n:=2^60;; for i in [1..2000000] do x:= q mod n; od; time; 2821 gap> q:=1/2^6000;;n:=3^6000;; for i in [1..6000] do x:= q mod n; od; time; 19358 After: gap> q:=1/3;;n:=7;; for i in [1..2000000] do x:= q mod n; od; time; 255 gap> q:=1/3;;n:=2^59;; for i in [1..2000000] do x:= q mod n; od; time; 244 gap> q:=1/3;;n:=2^60;; for i in [1..2000000] do x:= q mod n; od; time; 392 gap> q:=1/3^60;;n:=7;; for i in [1..2000000] do x:= q mod n; od; time; 245 gap> q:=1/3^60;;n:=2^59;; for i in [1..2000000] do x:= q mod n; od; time; 1219 gap> q:=1/3^60;;n:=2^60;; for i in [1..2000000] do x:= q mod n; od; time; 1292 gap> q:=1/2^6000;;n:=3^6000;; for i in [1..6000] do x:= q mod n; od; time; 692
olexandr-konovalov
changed the title
Compute modular inverses of integer faster
Compute modular inverses of integers faster
Jan 29, 2018
olexandr-konovalov
added
the
release notes: added
PRs introducing changes that have since been mentioned in the release notes
label
Jan 29, 2018
Added to release notes for GAP 4.10 at https://github.com/gap-system/gap/wiki/GAP-4.10-release-notes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind: enhancement
Label for issues suggesting enhancements; and for pull requests implementing enhancements
release notes: added
PRs introducing changes that have since been mentioned in the release notes
topic: kernel
topic: performance
bugs or enhancements related to performance (improvements or regressions)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is against
master
. Of course if people feel it would be useful for 4.9 or 4.9.1, could also retarget it againststable-4.9
Before (on a 64 bit machine):
After: