HNHacker News
TopNewBestAskShowJobs

kodefuguru

39 karma · joined May 10, 2010

C# MVP
submissionscomments
kodefuguru··on LINQ is better than foreach
I changed it to run with one million names and ran with the optimized foreach. I only did one pass.

foreach 00:00:01.7348710 linq 00:00:01.8607973

kodefuguru··on LINQ is better than foreach
Everyone get's that wrong, including Microsoft's documentation ;). It's a good optimization though, in spite of the LSP violation.
kodefuguru··on LINQ is better than foreach
IQueryable's get converted to expression trees which then get converted to sql. It's more of a "translated" to sql rather than a "compiled" to sql. The power of IQueryable is that the expression trees can be converted to so many different kinds of expressions, and you can write your own.

IEnumerable's extensions are mostly iterators over sequences.

kodefuguru··on Rex - Regular Expression Exploration
I've played around with this. You can reference the executable and play around with it.

http://www.kodefuguru.com/post/2010/05/03/Generate-Matches-f...