-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: 3.2.0
-
Component/s: Linq
-
None
-
None
-
Dotnet Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Currently the UseVarIfNotSimple method returns `null` for the binding if the value is simple, and later `AstExpression.Let` has special logic for skipping any binding that is `null`.
It would be simpler and generalize better if we moved the simplification of `$let` to the `AstSimplifier`. The simplification consists of removing any bindings where the value is "simple" and replacing var references with the simple expression. In many cases this will mean that the `$let` can be entirely optimized away. And even when not, it will likely result in fewer variables being needed.
- depends on
-
CSHARP-5523 Move all optimizations from AstExpression to AstSimplifier
-
- Backlog
-