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 IsPrimePowerInt in a few more cases, and fix a IsNilpotenGroup method #2306

Merged
merged 2 commits into from
Apr 10, 2018

Conversation

fingolfin
Copy link
Member

Note: the bug fix for the IsNilpotentGroup method normally is not necessary, because of immediate methods; but if immediate methods are turned off, the issue becomes apparent (already with our existing test suite, hence I am not adding a new tests for this).

@fingolfin fingolfin added kind: bug Issues describing general bugs, and PRs fixing them kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements labels Mar 26, 2018
@codecov
Copy link

codecov bot commented Mar 26, 2018

Codecov Report

Merging #2306 into master will increase coverage by <.01%.
The diff coverage is 75%.

@@            Coverage Diff             @@
##           master    #2306      +/-   ##
==========================================
+ Coverage   72.52%   72.52%   +<.01%     
==========================================
  Files         478      478              
  Lines      246816   246824       +8     
==========================================
+ Hits       179003   179013      +10     
+ Misses      67813    67811       -2
Impacted Files Coverage Δ
lib/integer.gi 87.93% <100%> (+0.1%) ⬆️
lib/grp.gi 85.37% <33.33%> (-0.1%) ⬇️
hpcgap/lib/hpc/stdtasks.g 38.61% <0%> (-0.26%) ⬇️
src/funcs.c 80.33% <0%> (+0.13%) ⬆️
src/objset.c 81.49% <0%> (+0.22%) ⬆️
hpcgap/lib/hpc/queue.g 69.59% <0%> (+3.19%) ⬆️

Specifically, for large inputs with some relatively small divisors. This
makes the performance of IsPrimePowerInt for numbers whose smallest
prime divisors are beyond the `Primes` list degrade more smoothly. For
powers of small primes (< 1000) the new code is never even triggered.

Before:

gap> IsPrimePowerInt(1009^1013 * 1013); time;
false
274

After:

gap> IsPrimePowerInt(1009^1013 * 1013); time;
false
2
The trivial group is a p-group in GAP, but 1 is *not* a prime power.
@fingolfin fingolfin merged commit 30d006f into gap-system:master Apr 10, 2018
@fingolfin fingolfin deleted the mh/speedup-IsPrimePowerInt branch April 10, 2018 21:29
@fingolfin fingolfin added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Jul 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Issues describing general bugs, and PRs fixing them 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants