[ty] Add a benchmark for very large tuples with lots of literals#22842
Merged
AlexWaygood merged 1 commit intomainfrom Jan 27, 2026
Merged
[ty] Add a benchmark for very large tuples with lots of literals#22842AlexWaygood merged 1 commit intomainfrom
AlexWaygood merged 1 commit intomainfrom
Conversation
2a51f4d to
fbb0962
Compare
fbb0962 to
7d05ff2
Compare
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
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.
Summary
This PR adds a benchmark that reproduces the pathological performance when type-checking https://github.com/MMD-Blender/blender_mmd_tools/blob/6ae13d6039763b6813832622c13da464983e93b3/mmd_tools/m17n.py, for measuring the performance impact of #22841
Test Plan
I used this Rust playground to check that the generated code was created as expected. Meanwhile, #22841 (comment) demonstrates that it's effective at demonstrating the performance improvement of #22841!
Codspeed reports that it takes 338ms to run the benchmark on
main, which is on the longer side for a microbenchmark. It goes down to 70ms on the PR branch for #22841, however, which is well within the range of timings for our other ty microbenchmarks.