title: JS: Fastest way to search for a long list of names in long text?
body: <p>I'm working on a Chrome extension that involves replacing words. There are around 6500 words I want to look for in any given page.</p>
  
  <p>I'm using <code>regex</code> expressions to find the words and replace them, but it's way too slow: around 10 seconds for an average news article.</p>
  
  <p>Is there a more efficient way to find a lot of specific words in a large string?</p>