Skip to content

Conversation

@dcreager
Copy link
Member

@dcreager dcreager commented May 9, 2025

This addresses @carljm's comment #17956 (review) about wanting to disambiguate legacy typevars that are used in multiple generic contexts.

WIP, not ready for review yet

@dcreager dcreager added internal An internal refactor or improvement ty Multi-file analysis & type inference labels May 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2025

mypy_primer results

Changes were detected when running on open source projects
zulip (https://github.com/zulip/zulip)
- zerver/actions/message_send.py:1836:5: error[invalid-assignment] Invalid assignment to data descriptor attribute `type` on type `Message` with custom `__set__` method
- Found 7319 diagnostics
+ Found 7318 diagnostics
Memory usage changes were detected when running on open source projects
trio (https://github.com/python-trio/trio)
-     memo metadata = ~21MB
+     memo metadata = ~22MB

prefect (https://github.com/PrefectHQ/prefect)
- TOTAL MEMORY USAGE: ~541MB
+ TOTAL MEMORY USAGE: ~568MB
-     struct metadata = ~23MB
+     struct metadata = ~25MB
-     memo metadata = ~73MB
+     memo metadata = ~76MB

@codspeed-hq
Copy link

codspeed-hq bot commented May 9, 2025

CodSpeed Instrumentation Performance Report

Merging #17994 will degrade performances by 6.88%

Comparing dcreager/distinct-legacy-typevars (f786216) with main (1d21816)

Summary

❌ 6 regressions
✅ 35 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
ty_check_file[cold] 116.3 ms 121.3 ms -4.07%
ty_check_file[incremental] 4.9 ms 5.3 ms -6.88%
ty_micro[many_tuple_assignments] 116.8 ms 122 ms -4.27%
anyio 832.8 ms 882.7 ms -5.65%
attrs 364.8 ms 383.9 ms -4.99%
hydra-zen 792.1 ms 834.9 ms -5.12%

@dcreager dcreager force-pushed the dcreager/distinct-legacy-typevars branch from 1958671 to f786216 Compare July 24, 2025 16:05
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 24, 2025

CodSpeed WallTime Performance Report

Merging #17994 will degrade performances by 10.88%

Comparing dcreager/distinct-legacy-typevars (f786216) with main (1d21816)

Summary

❌ 7 regressions

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
large[sympy] 43.4 s 47 s -7.63%
medium[colour-science] 7.2 s 8 s -9.99%
medium[pandas] 29.1 s 31.9 s -8.63%
small[altair] 2.4 s 2.7 s -10.88%
small[freqtrade] 4.1 s 4.4 s -6.65%
small[pydantic] 2.3 s 2.5 s -10.01%
small[tanjun] 1.7 s 1.8 s -8.93%

@dcreager
Copy link
Member Author

superseded by #19604

@dcreager dcreager closed this Jul 28, 2025
@dcreager dcreager deleted the dcreager/distinct-legacy-typevars branch July 28, 2025 21:37
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 ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants