dadhi / dadhi/FastExpressionCompiler
Optimize nested lambdas with closures
Open
performance
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
Currently FEC stores the data in the nested lambda closure and then calls method `Curry` to remove the closure from the lambda signature.
For example for nested `Func` the Curry is `Func Curry(Func f, Closure c) => () => f(c)`. It means that Curry creates another closure over f and c.
To avoid that, we may store the f in c and use an extension method for closure to use the closure as target, e.g. `T Closure.Func(this Closure c) => c.f(c);` and use it as `Func f = c.Func` **which is not a valid C#**.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.