You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds `Final` annotations to most module-level and class-level names I have found. Some of these are important to get performance boost after compiling with mypyc, other are just added for completeness. This PR also makes two runtime changes:
* `TypeOfAny` switched from an enum to using small integer constants, this is important for performance
* `binder.BindableTypes` is now inlined in two `isinstance()` checks. I first made it `Final`, but then realised that it will be much more efficient to just inline it, since these `isinstance()` checks are in a hot code path.
Note: after a new version of `typing_extensions` is released on PyPI we can skip all the `if MYPY: ...` checks.
The corresponding mypyc PR is mypyc/mypyc#439
0 commit comments