3 ms·
That is orders of magnitude slower and allocates. Of course you can use: https://github.com/jackmott/LinqFaster https://github.com/jackmott/LinqFaster
by gameswithgo 7y ago
That is orders of magnitude slower and allocates.
Of course you can use:
https://github.com/jackmott/LinqFaster https://github.com/jackmott/LinqFaster
- gwbas1c 7y agoWrong From the article: > It also turned out that Foreach often walks through the array faster than For
- merb 7y ago1. `ForEach` is slower. 2. `foreach` is faster. 3. Linq is slower.
- ducttape12 7y agoI write first for readability and performance second. Not to say that performance isn't important (and of course I pay attention to O notation), but throwing a little more memory and CPU power at a web page is far cheaper and easier than spending developer time reading code.