title: Correct data structure for fast insert and fast search?
body: <p>I have an array and I need to insert items there as fast as possible. Before adding an item I need to see if it exists, so I do a full array scan. I can't use binary search since I can't sort the array after every insert.</p>
  
  <p>Is there a more efficient data structure for this job?</p>
  
  <p><strong>Edit</strong>: On that array I store strings. Next to each string I store a 4 byte hash. I first compare the hashes and if they are the same then the string.</p>