Add fast path to analyzing special form assignments by JukkaL · Pull Request #16561 · python/mypy

Conversation

@JukkaL

This showed up as hot spot in a CPU profile collected when running tests.

This makes mypy/test/testcheck.py about 2% faster on my Linux desktop.

This showed up as hot spot in a CPU profile collected when running tests.

This makes `mypy/test/testcheck.py` about 2% faster on my Linux desktop.

@github-actions

Diff from mypy_primer, showing the effect of this PR on open source code:

discord.py (https://github.com/Rapptz/discord.py): typechecking got 1.07x slower (175.8s -> 188.8s)
(Performance measurements are based on a single noisy sample)

JelleZijlstra

@JukkaL JukkaL deleted the faster-tests-assignment branch

November 25, 2023 22:32

2 participants

@JukkaL @JelleZijlstra