Skip to content

Latest commit

 

History

History
44 lines (43 loc) · 3.03 KB

performance.md

File metadata and controls

44 lines (43 loc) · 3.03 KB

Here you can find a performance comparison of List<> and LargeList<> when the number of items becomes huge. The theoretical O() asymptotic behavior is provided, to help compare both lists with the theory.

O(1) - get O(1) - set O(1) - Capacity O(1) - Count O(1) - Add (within capacity) O(n) - Add (extending capacity) O(n) - AddRange (within capacity) O(n+m) - AddRange (extending capacity) O(1) - AsReadOnly O(log(n)) - BinarySearch O(n) - Clear O(n) - Contains O(n) - ConvertAll O(n) - CopyTo (at begining) O(n) - CopyTo (at end) O(n) - Exists O(n) - Find O(n) - FindAll O(n) - FindIndex O(n) - FindLast O(n) - FindLastIndex O(n) - ForEach O(1) - GetEnumerator O(n) - GetRange (at begining) O(n) - GetRange (at end) O(n) - IndexOf O(n) - Insert (at begining) O(1) - Insert (at end) O(n+m) - InsertRange (at begining) O(n+m) - InsertRange (at end) O(n) - LastIndexOf O(n) - Remove (at begining) O(n) - Remove (at end) O(n) - RemoveAt O(n) - RemoveRange (at begining) O(n) - RemoveRange (at end) O(n) - Reverse O(n.log(n)) - Sort (optimal case) O(n.log(n)) - Sort (random items) O(n) - ToArray O(1) - TrimExcess O(n) - TrueForAll