Test Outcome

  • Aside from the avoidance of garbage generation that you can do with arrays, reading from arrays is also 50% faster than reading from lists, and writing in arrays is 700% faster than writing in lists

  • foreach is also much slower in a List

  • List.Count has a noticeable overhead everytime it is called. You should cache it

The Test

http://jacksondunstan.com/articles/3058

http://jacksondunstan.com/articles/3577

http://jacksondunstan.com/articles/3816

results matching ""

    No results matching ""