Challenge: Spot the optimization

added by DotNetKicks
5/5/2022 1:24:35 PM

236 Views

Take a look at the following code: If we move line 4 to line 11, we can improve the performance of this code significantly. Here is what this looks like: The question is, why? The exact same amount of work is being done in both cases, after all.


0 comments