-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor
e.op
better inference perf (#1039)
The existing way of defining the op function simply builds a separate overload for every operator. That causes the type checker to instantiate a lot of types depending on how far down the list the overload is defined for that operator and operands. This change switches to defining separate overloads based on the operator's arity (unary, binary, ternary) and the operators return element and cardinality. That is strictly worse for those operators who were defined pretty close to the "top", but much better overall. It also seems to be the case that combinators (like and and or) meant that the number of type instantiations would explode by some factor (maybe exponential?) depending on how nested the operations got. This new technique is much more constant.
- Loading branch information
1 parent
8b9cb3f
commit 18f13ff
Showing
11 changed files
with
3,052 additions
and
1,548 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
"typescript": "^5.4.5" | ||
}, | ||
"dependencies": { | ||
"edgedb": "^1.5.0" | ||
"edgedb": "^1.5.0", | ||
"fast-check": "^3.19.0" | ||
} | ||
} |
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.