Skip to content

Fix slow Monotype specialization lookup#9848

Merged
rtfeldman merged 6 commits into
mainfrom
fix-slow-specialization
Jun 30, 2026
Merged

Fix slow Monotype specialization lookup#9848
rtfeldman merged 6 commits into
mainfrom
fix-slow-specialization

Conversation

@rtfeldman

Copy link
Copy Markdown
Contributor

Fixes #9802. This replaces the slow specialization lookup and recursive digest hot path with direct callable/type identity lookup, keeps active Monotype body lowering in draft graph-owned type cells until sealing, and records the completed implementation plan for the issue. The clean-machine timing comparison is left as benchmark-host validation because this workstation is not suitable for timing conclusions.

@rtfeldman rtfeldman marked this pull request as ready for review June 28, 2026 02:58
@rtfeldman rtfeldman force-pushed the fix-slow-specialization branch from 1125937 to fe0306f Compare June 28, 2026 02:59
@rtfeldman rtfeldman force-pushed the fix-slow-specialization branch from 8a4b0ae to 249b810 Compare June 28, 2026 19:32
# Conflicts:
#	src/postcheck/lambda_mono/lower.zig
#	src/postcheck/lambda_solved/solve.zig
#	src/postcheck/monotype/ast.zig
#	src/postcheck/monotype/lower.zig
#	src/postcheck/monotype_lifted/lift.zig
#	src/postcheck/monotype_lifted/spec_constr.zig
#	src/postcheck/solved_lir_lower.zig
# Conflicts:
#	src/check/checked_artifact.zig
#	src/postcheck/monotype/lower.zig
#	src/postcheck/monotype_lifted/lift.zig
#	src/postcheck/solved_lir_lower.zig
@rtfeldman rtfeldman merged commit 2c0f339 into main Jun 30, 2026
37 of 39 checks passed
@rtfeldman rtfeldman deleted the fix-slow-specialization branch June 30, 2026 02:04
@Anton-4 Anton-4 mentioned this pull request Jul 1, 2026
pull Bot pushed a commit to DaviRain-Su/roc that referenced this pull request Jul 3, 2026
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.

Specialization is very slow for generic higher-order wrappers with many closure call sites

1 participant