-
Notifications
You must be signed in to change notification settings - Fork 830
Fix type subsumption cache key perf regression #18926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
❗ Release notes required
|
T-Gro
reviewed
Sep 22, 2025
T-Gro
approved these changes
Sep 22, 2025
majocha
commented
Sep 22, 2025
This was referenced Oct 14, 2025
Contributor
|
@T-Gro backporting to "release/dev18.0" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: fix perf
Using index info to reconstruct a base tree...
M src/Compiler/Utilities/TypeHashing.fs
Falling back to patching base and 3-way merge...
Auto-merging src/Compiler/Utilities/TypeHashing.fs
CONFLICT (content): Merge conflict in src/Compiler/Utilities/TypeHashing.fs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 fix perf
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Generating structural information for
TTypeis slow. This adds some optimizations, most importantly memoization of generated type structures.It is important to avoid holding strong references to TType in cache keys ( it was the point of #18875) so we use a weak table for memoization.
Fixes #18925
type check times are now roughly back to what they were before the regression (see #18925)
Caveat: this is amateur hour stuff, I have no CS background and no experience writing high performance code so any suggestions are super welcome.