title: Is "startsWith" faster than "indexOf"?
body: <p>I am writing code in Java where I branch off based on whether a <code>string</code> starts with certain characters while looping through a <code>dataset</code> and my <code>dataset</code> is expected to be large. </p>
  
  <p>I was wondering whether <code>startsWith</code> is faster than <code>indexOf</code>. I did experiment with 2000 records but not found any difference.</p>