Replies: 3 comments 2 replies
-
Is there an easy way to retrieve the generated IL code? I'm having an issue and could benefit from seeing the generated code. |
Beta Was this translation helpful? Give feedback.
-
Hi, see the example of diagnostics including the IL dump in the tests |
Beta Was this translation helpful? Give feedback.
-
Hi there, sorry, for this probably quite complicated question. Do you think it is possible to merge the op codes of a method and a delegate argument? What I mean: Compiling A bit about the motivation: Currently, we use an ExpressionVisitor to replace any constellation of Linq Where / Select / Count / Sum / Any / First / Last by loops where the loop uses the expressions for the selectors and perdicates.
Benchmarks of the compiled lambda show, that this removes any allocations and it is about 2.5 times faster (loop vs. enumeration plus no calling of delegates) (in .net9). The question won't handle the Linq cases, as those usually forward the argument to specialized iterators. But it would help us, with our own extension methods. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Welcome to the discussions 🥂
Beta Was this translation helpful? Give feedback.
All reactions