Skip to content

Add SpeedupDataPcHom - #6449

Merged
fingolfin merged 6 commits into
gap-system:masterfrom
hulpke:speedupc
Jul 18, 2026
Merged

fingolfin merged 6 commits into
gap-system:masterfrom
hulpke:speedupc

Conversation

@hulpke

@hulpke hulpke commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Implements a chunked caching scheme for evaluating bijective GroupGeneralMappingByPcgs homomorphisms on PC words. Splits the source pcgs into chunks, caching linear combinations of generator images per exponent pattern, with the bottom elementary abelian layer handled via a matrix over the corresponding prime field. Includes a corresponding ImagesRepresentative method that uses this cached data for a >2.5x speedup, per the included GAPDoc example.

@fingolfin fingolfin added topic: performance bugs or enhancements related to performance (improvements or regressions) topic: library labels Jul 1, 2026
@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.47368% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.99%. Comparing base (433541e) to head (c4cc950).

Files with missing lines Patch % Lines
lib/ghompcgs.gi 89.18% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6449      +/-   ##
==========================================
- Coverage   79.01%   78.99%   -0.02%     
==========================================
  Files         685      646      -39     
  Lines      293519   279134   -14385     
  Branches     8667     7904     -763     
==========================================
- Hits       231924   220502   -11422     
+ Misses      59794    57112    -2682     
+ Partials     1801     1520     -281     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

hulpke added 3 commits July 2, 2026 15:33
Implements a chunked caching scheme for evaluating bijective
GroupGeneralMappingByPcgs homomorphisms on PC words. Splits the source
pcgs into chunks, caching linear combinations of generator images per
exponent pattern, with the bottom elementary abelian layer handled via
a matrix over the corresponding prime field. Includes a corresponding
ImagesRepresentative method that uses this cached data for a >2.5x
speedup, per the included GAPDoc example.
This excludes timing factor, as test overhead kills it.

@fingolfin fingolfin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just resolved a merge conflict.

Overall this PR seems fine, but as long as we don't the functionality for the public, it is of limited use. Given that you took the effort to write a GAPDoc comment, shouldn't we hook it up into the reference manual?

Comment thread lib/ghompcgs.gd
@hulpke

hulpke commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

I just resolved a merge conflict.

Thank you!

This is intended as a first step towards including hybrid groups. If that is the case it will be used implicitly.

Overall this PR seems fine, but as long as we don't the functionality for the public, it is of limited use. Given that you took the effort to write a GAPDoc comment, shouldn't we hook it up into the reference manual?

The documentation is in part thanks to Claude :-| . (I know the value of documentation but always give up with the GAPdoc format ...)
I was in two minds whether we want to offer this as a documented functionality to users? I am happy for either decision, that's why it is not yet hooked up.

@fingolfin fingolfin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code seems sensible. I'd slightly improve the test, and perhaps some comments can be clarified etc.

Comment thread tst/teststandard/opers/PcHomSpeedup.tst Outdated
Comment thread lib/ghompcgs.gi Outdated
Comment thread lib/ghompcgs.gi
if r=fail then TryNextMethod();fi;
rg:=r.groupData;
depths:=rg.depths;
# in next line subtract 1 to use the lowest level matrix

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand. The next line does not subtraction. Is the comment outdated?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I still am curious about this comment, I don't mean to hold this PR up over it.

Comment thread lib/ghompcgs.gi Outdated
Comment thread lib/ghompcgs.gi Outdated
Comment thread lib/ghompcgs.gi Outdated
Co-authored-by: Max Horn <max@quendi.de>
@fingolfin

Copy link
Copy Markdown
Member

@hulpke If you have no objections I'll apply my suggestions and merge the PR afterwards.

@hulpke

hulpke commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

@hulpke If you have no objections I'll apply my suggestions and merge the PR afterwards.

No objection. I thought you were expecteing an explanation of the comment in line 839 first, which was holding me back.

PS. And I'm happy to resolve the merge conflicts that will arise b/c of the automorphism group updates.

Co-authored-by: Max Horn <max@quendi.de>

@fingolfin fingolfin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fingolfin
fingolfin merged commit 25c7fc7 into gap-system:master Jul 18, 2026
30 checks passed
cdwensley pushed a commit that referenced this pull request Jul 23, 2026
Implements a chunked caching scheme for evaluating bijective
GroupGeneralMappingByPcgs homomorphisms on PC words. Splits the source
pcgs into chunks, caching linear combinations of generator images per
exponent pattern, with the bottom elementary abelian layer handled via
a matrix over the corresponding prime field. Includes a corresponding
ImagesRepresentative method that uses this cached data for a >2.5x
speedup, per the included GAPDoc example.
@hulpke
hulpke deleted the speedupc branch July 24, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: library topic: performance bugs or enhancements related to performance (improvements or regressions)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants