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 GcdInt, PValuation, SmallestRootInt, IsPrimePowerInt #2086

Merged
merged 4 commits into from
Jan 15, 2018

Conversation

fingolfin
Copy link
Member

This PR contains the non-controversial subset of PR #2061, i.e. it drops the RootInt kernel rewrite, and some subsequent tweaks.

I hope this can be merged ASAP, after which I'd rebase PR #2061.

This gives perhaps 5-8% improvement for me. Not much,
but worthwhile.
Before:

gap> SumX([-100000 .. 100000], [-5,2,3,5,7,251,256], PVALUATION_INT);; time;
615

After:

gap> SumX([-100000 .. 100000], [-5,2,3,5,7,251,256], PVALUATION_INT);; time;
327
Also correct a comment which claimed Euler's criterion was used,
but it is actually Fermat's little theorem.
Before:
gap> Number([-100000..100000], IsPrimePowerInt);; time;
1753

After:
gap> Number([-100000..100000], IsPrimePowerInt);; time;
168
@fingolfin fingolfin added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: performance bugs or enhancements related to performance (improvements or regressions) topic: kernel labels Jan 13, 2018
@fingolfin fingolfin mentioned this pull request Jan 13, 2018
@ChrisJefferson ChrisJefferson merged commit 286b995 into gap-system:master Jan 15, 2018
@fingolfin fingolfin deleted the mh/integer branch January 15, 2018 15:10
@olexandr-konovalov olexandr-konovalov added this to the GAP 4.10.0 milestone Jan 22, 2018
@olexandr-konovalov olexandr-konovalov added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Jan 29, 2018
@olexandr-konovalov
Copy link
Member

olexandr-konovalov commented 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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants