[Solved] Which is faster, for loop or LINQ
Neither. Using a loop has less overhead than LINQ, so that is a good start. Use the < operator in the loop condition, that is the standard way of writing such a loop, so it’s more likely that the compiler will recognise it and optimise it properly. Using Math.Pow to square a number is not … Read more