title: Sorting an array and indexOf() runtime
body: <p>Is it safe to assume that <code>array.indexOf()</code> does a linear search from the beginning of the array?</p>
  
  <p>So if I often search for the biggest value, will sorting the array before calling <code>indexOf</code> make it run even faster?</p>
  
  <p>Notes: </p>
  
  <p>I want to sort only once and search many times. </p>
  
  <p>"biggest value" is actually the most popular search key which is a string.</p>