title: Two-way hash table
body: <p>Is there an efficient implementation of a hash table, which maps key (integer) to values (string) and vice versa, for some compiled language?</p>
  
  <p>Of course, one could always have two tables, one for key=>value mapping and other for value=>key. However that would not be very efficient, at least not memory-wise. Possibly both mappings can be in a single table, if the type system and intended usage allow it.</p>