Skip to content

bootstrap: avoid counting modules for singleton groups - #16535

Merged
anmonteiro merged 1 commit into
ocaml:mainfrom
anmonteiro:perf/bootstrap-map-is-singleton
Oct 4, 2026
Merged

anmonteiro merged 1 commit into
ocaml:mainfrom
anmonteiro:perf/bootstrap-map-is-singleton

Conversation

@anmonteiro

@anmonteiro anmonteiro commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Add the compatible singleton check to the bootstrap map wrapper and avoid full cardinality scans. Follow-up to #16533.

Mirror the short-circuiting singleton check in the bootstrap Map wrapper,
which cannot depend on Stdune. Use it instead of computing a full map
cardinality when constructing module groups.

Signed-off-by: Antonio Nuno Monteiro <[email protected]>
@anmonteiro
anmonteiro force-pushed the perf/bootstrap-map-is-singleton branch from abf8482 to b2d40e6 Compare October 4, 2026 22:33
@anmonteiro
anmonteiro merged commit 34e1529 into ocaml:main Oct 4, 2026
36 checks passed
@anmonteiro
anmonteiro deleted the perf/bootstrap-map-is-singleton branch October 4, 2026 22:44
@Alizter Alizter added this to the 3.26.0 milestone Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants