[ty] Gate protocol compatibility on member count#24684
Conversation
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 87.94%. The percentage of expected errors that received a diagnostic held steady at 83.36%. The number of fully passing files held steady at 79/133. |
Memory usage reportMemory usage unchanged ✅ |
|
AlexWaygood
left a comment
There was a problem hiding this comment.
If this fixes a case where we previously had pathological (or much worse) performance, can we add that case as a microbenchmark in a separate PR and then rebase this PR on top of that to see the performance improvement in CI?
If we don't add benchmarks for this kind of thing and the improvement isn't reflected in codspeed or the ecosystem-analyzer timings, I think it'll be very easy for us to accidentally regress on performance in the future
|
Good call |
d7c2ced to
d94213d
Compare
d94213d to
9984232
Compare
Merging this PR will improve performance by 91.11%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | ty_micro[many_protocol_members_mismatch] |
337 ms | 176.4 ms | +91.11% |
Comparing charlie/member-count (0a460bb) with main (1ab0ba3)
Footnotes
-
60 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
## Summary Add a benchmark to demonstrate the improvement in #24684.
9984232 to
0a460bb
Compare
Summary
This is a small optimization in the manner of 93a16bd. Codex reports that for protocol with a large number of members (
Small), and then another with one more member (Big), anddef check_i(value: Small) -> Big: return valuerepeated many times, we get a 39% speedup.