title: Efficient C++ associative container with vector key
body: <p>I've constructed a map which has a vector as its key: <code>map&lt;vector&lt;KeyT&gt;, T&gt;</code> which I'm trying to optimize now.</p>
  
  <p>An experiment with manually nested maps <code>map&lt;vector&lt;KeyT&gt;, map&lt;KeyT,T&gt; &gt;</code> where the first key is the original vector minus the last element and the second key is the last element shows a reasonable speed-up.</p>
  
  <p>Now I'm wondering whether there exists a semi-standard implementation (like boost or similar) of an associative container where vector keys are implemented as such a hierarchical structure of containers.</p>
  
  <p>Ideally, this would create as many layers as there are elements in the key vector, while keeping a uniform syntax for vectors of different length.</p>