Note that there are some explanatory texts on larger screens.

plurals
  1. POWhen not to use lambda expressions
    primarykey
    data
    text
    <p>A lot of questions are being answered on Stack&nbsp;Overflow, with members specifying how to solve these real world/time problems using <a href="https://en.wikipedia.org/wiki/Anonymous_function" rel="nofollow noreferrer">lambda expressions</a>.</p> <p>Are we overusing it, and are we considering the performance impact of using lambda expressions?</p> <p>I found a few articles that explores the performance impact of lambda vs anonymous delegates vs <code>for</code>/<code>foreach</code> loops with different results</p> <ol> <li><a href="http://blogs.microsoft.co.il/blogs/alex_golesh/archive/2007/12/11/anonymous-delegates-vs-lambda-expressions-vs-function-calls-performance.aspx" rel="nofollow noreferrer">Anonymous Delegates vs Lambda Expressions vs Function Calls Performance</a></li> <li><a href="http://diditwith.net/2006/10/05/PerformanceOfForeachVsListForEach.aspx" rel="nofollow noreferrer">Performance of foreach vs. List.ForEach</a></li> <li><a href="http://jerrytech.blogspot.com/2008/09/netc-loop-performance-test-for-foreach.html" rel="nofollow noreferrer">.NET/C# Loop Performance Test (FOR, FOREACH, LINQ, &amp; Lambda)</a>.</li> <li><a href="https://stackoverflow.com/questions/626679/datatable-select-vs-datatable-rows-find-vs-foreach-vs-findpredicatet-lambda/650922#650922">DataTable.Select is faster than LINQ</a></li> </ol> <p>What should be the evaluation criteria when choosing the appropriate solution? Except for the obvious reason that it's more concise code and readable when using lambda.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload