title: What Browser-Based Tools can I use to Check the Efficiency and Memory Usage Of My JavaScript Code?
body: <p>I am currently reading <em>High Performance JavaScript</em> by Nicholas C. Zakas and in the book he says things like:</p>
  
  <blockquote>
    <p>Comparing the two pieces of code shows that using the Selectors API is
    2 to 6 times faster across browsers (Figure 3-6).</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/PyeIZ.png" alt="Figure 3-6. The benefit of using the Selectors API instead of iterating over the results of getElementsbyTagName()"></p>
  
  <p><strong>What I'm looking for is a browser based tool that lets me capture and measure the performance of a given piece of JavaScript and compare it against another script that uses a different approach (e.g., using the Selector API vs <code>getElementsByTagName</code>).</strong></p>
  
  <p>I've used Chrome and Firebug, but neither of them really seem to give me the kind of comparisons he's doing here. Am I using these tools incorrectly or is there a new tool I'm not familiar with that I should be using?</p>