Open dadhi opened 4 years ago
Couple of questions to answer:
Why do we collecting constants multiple times for the same sub-expression? Can we do better, at least for New or Call expressions. We need to test this.
Does it better to use a single closure constants array for all root and nested lambdas, it should take less memory but may be harder to collect because the array is larger, or the first point will help?
new ArrayClosure(sharedConstAndNestedLambdas, new object[...nonPassedParams])
Related to
Currently, FEC has a
TryCompileWithPreCreatedClosure
method with limited functionality without nested lambdas support.We may enable it so that big and deep expressions may skip the closure collection phase improving the performance and saving the memory.
Todo:
ArrayClosure
so they could be set independently. It should not affect the memory much because it is just plus one pointer.NestedLambdaInfo
.