title: Chrome thinks 99,999 is drastically different than 100,000
body: <p>I just ran into a very interesting issue when someone posted a jsperf benchmark that conflicted with a previous, nearly identical, benchmark I ran.</p>
  <p>Chrome does something <em>drastically</em> different between these two lines:</p>
  <pre><code>new Array(99999);  // jsperf ~50,000 ops/sec
  new Array(100000); // jsperf ~1,700,000 ops/sec
  </code></pre>
  <p>benchmarks: <a href="http://jsperf.com/newarrayassign/2" rel="nofollow noreferrer">http://jsperf.com/newarrayassign/2</a></p>
  <p>I was wondering if anyone has any clue as to what's going on here!</p>
  <p>(To clarify, I'm looking for some low-level details on the V8 internals, such as it's using a different data structure with one vs the other and what those structures are)</p>