title: Performance: findIndex vs Array.prototype.map
body: <p><strong>In 2019,</strong> if I am handling an array of objects, with a length north of say 15000 and I need to find an index of an object by value, which of the following methods is going to be my best option performance-wise? </p>
  
  <p>Six year old 'answer': <a href="https://stackoverflow.com/questions/10557486/in-an-array-of-objects-fastest-way-to-find-the-index-of-an-object-whose-attribu">In an array of objects, fastest way to find the index of an object whose attributes match a search</a></p>
  
  <p><strong>findIndex</strong></p>
  
  <pre><code>array.findIndex(object =&gt; foo === object.id);
  </code></pre>
  
  <p><strong>Array.prototype.map</strong></p>
  
  <pre><code>array.map(object =&gt; object.id).indexOf(foo);
  </code></pre>