paulirwin commented on issue #1062:
URL: https://github.com/apache/lucenenet/issues/1062#issuecomment-2524854405

   @NightOwl888 Thanks for that context. Looking at the changes to fix the 
performance issues you mention, it was a difference between having a lambda 
that captures and a string interpolation, which is quite different than the 
scenario here.
   
   When data in the surrounding scope is captured, here it's the difference 
between having a custom AnonymousClass that captures the data in a field, and 
for a lambda, that is generated by the compiler as a class that captures the 
field, so they should be about identical in terms of heap allocation and 
performance. The compiler might be able to apply greater optimizations to 
lambdas that do not capture. I'll benchmark to be sure though.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to