Skip to content

Enhance NumberSmallGroups(<order>, <filter>) by avoiding to list the groups whose count we want - #73

Merged
fingolfin merged 1 commit into
masterfrom
count-without-listing
Aug 16, 2026
Merged

Enhance NumberSmallGroups(<order>, <filter>) by avoiding to list the groups whose count we want#73
fingolfin merged 1 commit into
masterfrom
count-without-listing

Conversation

@fingolfin

@fingolfin fingolfin commented Aug 15, 2026

Copy link
Copy Markdown
Member

For example, NumberSmallGroups(1536, IsSupersolvableGroup) constructs 408641062 pairs just to count and and discard them.

Almost none of that work is needed if we use the indices properly. A layer can hook into COUNT_SMALL_GROUPS_FUNCS for this. Those layers selecting generically can us SMALL_GROUPS_COUNT_GENERIC there. Layers which don't use the hook falls back to the previous approach of listing group (ids) and counting them.

To make this easier, we split two helpers out of SelectSmallGroups: SMALL_GROUPS_PARSE_QUERY reads the arguments, and SMALL_GROUPS_LIBRARY_NUMBER renumbers for 3^7, 5^7, 7^7 and 11^7

@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.28058% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 99.88%. Comparing base (725717e) to head (299aa4e).

Files with missing lines Patch % Lines
gap/small.gi 99.21% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master      #73   +/-   ##
=======================================
  Coverage   99.88%   99.88%           
=======================================
  Files         509      509           
  Lines      373151   373210   +59     
=======================================
+ Hits       372727   372793   +66     
+ Misses        424      417    -7     
Files with missing lines Coverage Δ
small10/smlgp10.g 98.31% <100.00%> (+0.01%) ⬆️
small11/smlgp11.g 97.97% <100.00%> (+<0.01%) ⬆️
small3/smlgp3.g 96.66% <100.00%> (+1.87%) ⬆️
small4/smlgp4.g 91.13% <100.00%> (+0.03%) ⬆️
small6/smlgp6.g 99.67% <100.00%> (+<0.01%) ⬆️
small7/smlgp7.g 94.16% <100.00%> (+0.02%) ⬆️
small8/smlgp8.g 53.47% <100.00%> (+0.20%) ⬆️
small9/smlgp9.g 99.36% <100.00%> (+<0.01%) ⬆️
gap/small.gi 98.14% <99.21%> (+0.48%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fingolfin fingolfin changed the title Count a selection without listing it Enhance NumberSmallGroups(<order>, <filter>) by avoiding to list the groups whose count we want Aug 15, 2026
Comment thread gap/small.gi Outdated
@fingolfin
fingolfin force-pushed the count-without-listing branch from d7f8a61 to f1413a5 Compare August 16, 2026 07:16
For example, `NumberSmallGroups(1536, IsSupersolvableGroup)`
constructs 408641062 pairs just to count and and discard them.

Almost none of that work is needed if we use the indices properly.
A layer can hook into `COUNT_SMALL_GROUPS_FUNCS` for this. Those
layers selecting generically can us `SMALL_GROUPS_COUNT_GENERIC`
there. Layers which don't use the hook falls back to the previous
approach of listing group (ids) and counting them.

To make this easier, we split two helpers out of
`SelectSmallGroups`: `SMALL_GROUPS_PARSE_QUERY` reads the
arguments, and `SMALL_GROUPS_LIBRARY_NUMBER` renumbers for 3^7,
5^7, 7^7 and 11^7

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@fingolfin
fingolfin force-pushed the count-without-listing branch from f1413a5 to 299aa4e Compare August 16, 2026 07:20
@fingolfin
fingolfin merged commit 4626679 into master Aug 16, 2026
4 of 5 checks passed
@fingolfin
fingolfin deleted the count-without-listing branch August 16, 2026 07:31
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.

1 participant