title: Performance of Dictionary<string, object> vs List<string> + BinarySearch
body: <p>I have a custom performance timer implementation. In short it is a static data collection storing execution duration of some code paths. In order to identify particular measurements I need a collection of named objects with quick access to the data item by name i.e. a <code>string</code> of moderate length like 20-50 chars.</p>
  
  <p>Straightforward way to do that could be a <code>Dictionary&lt;string, MyPerformanceCounter&gt;</code> with access by key which is the counter id.</p>
  
  <p>What about a <code>List&lt;MyPerformanceCounter&gt;</code> which could be accessed and maintained sorted via <code>List&lt;T&gt;.BinarySearch</code> and <code>List.Insert</code>. Does it have a chance to have more linear performance when I would need to have several hundreds of counters?</p>
  
  <p>Needless to say I need the access to the proper <code>MyPerformanceCounter</code> to be as quick as possible as it is called at rates of dozens of thousands per second and should affect code execution as less as possible. </p>
  
  <p>New counters are appended relatively seldom like once per second.</p>