The Artima Developer Community
Sponsored Link

.NET Buzz Forum
C# collection classes performance

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Richard Jonas

Posts: 147
Nickname: rjonas
Registered: Nov, 2005

Richard Jonas is a .NET sofware developer living in the UK.
C# collection classes performance Posted: Oct 10, 2006 3:22 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Richard Jonas.
Original Post: C# collection classes performance
Feed Title: Richard Jonas
Feed URL:
Feed Description: Richard Jonas's blog about .NET, web development and agile methodologies.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Richard Jonas
Latest Posts From Richard Jonas

I was looking for a table summarizing how different C# generic and non-generic collection classes performed, relative to one another, thought there would be hundreds available, but could not find one. So here one is for my future reference, and for anyone else who reads this.

O(1) = constant time
O(log n) = time proportional to the log of the number of elements in the collection
O(n) = time proportional to the number of elements in the collection

Some collections are better for smaller collections, but don't scale to larger ones. The List, LinkedList, SortedList, Queue and Stack classes are better for smaller collections than the Dictionary, Hashtable and SortedDictionary classes.

Read: C# collection classes performance

Topic: Notes from the Mozilla team's visit to Microsoft campus Previous Topic   Next Topic Topic: Moving Data Between Tiers

Sponsored Links


Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use