[ty] Restore IsNonTerminalCall shortcut optimization (again)#24185
[ty] Restore IsNonTerminalCall shortcut optimization (again)#24185
IsNonTerminalCall shortcut optimization (again)#24185Conversation
IsNonTerminalCall shortcut optimization (again)
There was a problem hiding this comment.
I made some attempts to minify this and/or change it to something that is easier in structure, but eventually decided to simply use the version from the issue.
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 86.46%. The percentage of expected errors that received a diagnostic held steady at 80.68%. The number of fully passing files held steady at 67/132. |
Memory usage reportSummary
Significant changesClick to expand detailed breakdownprefect
sphinx
trio
flake8
|
|
| Lint rule | Added | Removed | Changed |
|---|---|---|---|
invalid-argument-type |
1 | 0 | 0 |
invalid-assignment |
1 | 0 | 0 |
invalid-return-type |
0 | 0 | 1 |
type-assertion-failure |
1 | 0 | 0 |
| Total | 3 | 0 | 1 |
Raw diff:
egglog-python (https://github.com/egraphs-good/egglog-python)
+ python/egglog/egraph.py:2139:24 error[invalid-argument-type] Argument to function `expr_action` is incorrect: Expected `BaseExpr`, found `(BaseExpr & ~Action) | (Fact & ~Action)`
hydpy (https://github.com/hydpy-dev/hydpy)
+ hydpy/core/devicetools.py:2425:9 error[type-assertion-failure] Type `Literal["inlets", "outlets", "observers", "receivers", "senders", "inputs", "outputs"]` is not equivalent to `Never`
pydantic (https://github.com/pydantic/pydantic)
- pydantic/v1/utils.py:613:16 error[invalid-return-type] Return type does not match returned value: expected `Mapping[int | str, Any]`, found `(AbstractSet[int | str] & Top[Mapping[Unknown, object]]) | Mapping[int | str, Any] | dict[int | str, ellipsis]`
+ pydantic/v1/utils.py:613:16 error[invalid-return-type] Return type does not match returned value: expected `Mapping[int | str, Any]`, found `(AbstractSet[int | str] & Top[Mapping[Unknown, object]]) | (Mapping[int | str, Any] & AbstractSet[object]) | (Mapping[int | str, Any] & ~AbstractSet[object]) | dict[int | str, ellipsis]`
trio (https://github.com/python-trio/trio)
+ src/trio/_core/_tests/test_run.py:2440:24 error[invalid-assignment] Object of type `Value[object] | Error` is not assignable to `Outcome[str] | None`
Merging this PR will not alter performance
Performance Changes
Comparing |
|
It's very unfortunate that I need to acknowledge a (small) performance regression on pandas in order to fix this performance regression in astral-sh/ty#3120, but I currently see no other way. |
carljm
left a comment
There was a problem hiding this comment.
Too bad :/ Thanks for exploring!
|
the new benchmark is currently timing out after my last commit. need to take another look tomorrow. |
shows you wrote an effective regression benchmark! |
This reverts commit 5348e47.
Summary
I tried a few other things, but none of them worked, so for now, let's just revert a2c5af0 (again). Note that it's not an exact revert because we renamed
NoReturn->IsNonTerminalCalland inverted the logic in between.Also, I fixed the bug that was described in the original PR (#23378).closes astral-sh/ty#3120
Note for reviewers: The only thing that's really new here is the benchmark,
and the changes in the second commit (5348e47).Test Plan
New benchmark