Easy performance increases

Patrick has posted an interesting article on foreach performance stating that a for loop with an array is up to 5 times faster than the same code executed in a foreach on List (assuming the contents is the same, just the container type is different). This wont affect most of us, however if you have a situation with nested loops this could be a significant performance improvement.

One thought on “Easy performance increases

  1. It looks like in his comments that some JIT magic makes the results slightly different on subsequent running of the code.I wonder if using N-Gen would further affect these results. Well I dont need to wonder, I should just spike it out.

    Like

Leave a reply to Lee Campbell Cancel reply