forked from python/mypy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mypyc] Simplify IR for tagged integer comparisons (python#9607)
In a conditional context, such as in an if condition, simplify the IR for tagged integer comparisons. Also perform some additional optimizations if an operand is known to be a short integer. This slightly improves performance when compiling with no optimizations. The impact should be pretty negligible otherwise. This is a bit simple-minded, and some further optimizations are possible. For example, `3 < x < 6` could be made faster. This covers the most common cases, however. Closes mypyc/mypyc#758.
- Loading branch information
Showing
10 changed files
with
821 additions
and
1,019 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.