Skip to content

Add specialisation pragmas for hot polymorphic paths. - #860

Merged
ndmitchell merged 1 commit into
ndmitchell:masterfrom
AndreasPK:wip/spec-shake
Oct 4, 2026
Merged

ndmitchell merged 1 commit into
ndmitchell:masterfrom
AndreasPK:wip/spec-shake

Conversation

@AndreasPK

@AndreasPK AndreasPK commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

For hadrian (ghcs build system) these improve runtime of a no-rebuild invocation of the build system by about 10%.

I have not spent much time verifying all of the pragmas are needed, only that the speedup happens as they are. Build time overhead is about 1% from the pragmas.

The other alternative would be to use -fspecialise-aggressively -fexpose-overloaded-unfoldings, which is more robust but comes at a heavier build time cost.

For hadrian (ghcs build system) these improve runtime of a no-rebuild invocation
of the build system by about 10%.
@ndmitchell
ndmitchell merged commit d72f83b into ndmitchell:master Oct 4, 2026
0 of 11 checks passed
@ndmitchell

Copy link
Copy Markdown
Owner

These seem harmless at worst, and if they get a big perf increase, well worth having. Thanks!

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.

2 participants