-
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
compiler-performanceMaking parsing / type checking / transformations fasterMaking parsing / type checking / transformations fasternarrowingExpressions that change the types of valuesExpressions that change the types of values
Description
Currently narrowing calls can be done multiple times for an type.
const x = a && b && c && d;
1. ^ a is truthy
2. ^^^^^^ a & b are truthy
3. ^^^^^^^^^^^ a, b & c are truthy
if (x) { }
4. ^ a, b, c & d are truthy
Don't have a great example, maybe can come up with a better one?
Probably not too much of a problem, might be possible to create large chains that do become a problem for performance though, maybe something can be done about that?
Metadata
Metadata
Assignees
Labels
compiler-performanceMaking parsing / type checking / transformations fasterMaking parsing / type checking / transformations fasternarrowingExpressions that change the types of valuesExpressions that change the types of values