Skip to content

[ty] Add a benchmark for very large tuples with lots of literals#22842

Merged
AlexWaygood merged 1 commit intomainfrom
alex/big-tuple-bench
Jan 27, 2026
Merged

[ty] Add a benchmark for very large tuples with lots of literals#22842
AlexWaygood merged 1 commit intomainfrom
alex/big-tuple-bench

Conversation

@AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Jan 24, 2026

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.

@AlexWaygood AlexWaygood added performance Potential performance improvement ty Multi-file analysis & type inference labels Jan 24, 2026
@AlexWaygood AlexWaygood added the internal An internal refactor or improvement label Jan 24, 2026
Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AlexWaygood AlexWaygood merged commit 2e7b74d into main Jan 27, 2026
45 checks passed
@AlexWaygood AlexWaygood deleted the alex/big-tuple-bench branch January 27, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement performance Potential performance improvement ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants