title: C# Binary Trees and Dictionaries
body: <p>I'm struggling with the concept of when to use binary search trees and when to use dictionaries.</p>
  
  <p>In my application I did a little experiment which used the C5 library <code>TreeDictionary</code> (which I believe is a red-black binary search tree), and the C# dictionary. The dictionary was always faster at add/find operations and also always used less memory space. For example, at 16809 <code>&lt;int, float&gt;</code> entries, the dictionary used 342 KiB whilst the tree used 723 KiB.</p>
  
  <p>I thought that BST's were supposed to be more memory efficient, but it seems that one node of the tree requires more bytes than one entry in a dictionary. What gives? Is there a point at where BST's are better than dictionaries? </p>
  
  <p>Also, as a side question, does anyone know if there is a faster + more memory efficient data structure for storing <code>&lt;int, float&gt;</code> pairs for dictionary type access than either of the mentioned structures?</p>