title: JavaScript runtime complexity of Array functions
body: <p>Is the runtime complexity defined by the JS standard on common <code>Array</code> functions like <code>push</code>, <code>pop</code>, <code>shift</code>, <code>slice</code> or <code>splice</code>? Esp. I'm interested in removing and inserting entries at random positions. If the complexity is not defined, what can I expect, e.g. in V8?</p>
  
  <p>(This question was inspired by <a href="https://stackoverflow.com/questions/1344500/efficient-way-to-insert-a-number-into-a-sorted-array-of-numbers">this</a>. Also, <a href="http://jsperf.com/array-direct-assignment-vs-push" rel="noreferrer">this benchmark</a>, posted <a href="https://stackoverflow.com/questions/614126/why-is-array-push-sometimes-faster-than-arrayn-value/14997768">here</a>, also makes me curious, but maybe that is some unrelated phenomena.)</p>
  
  <p>(A very related question is <a href="https://stackoverflow.com/questions/11514308/big-o-of-javascript-arrays">here</a>. However, one of the comments on the accepted answer says that it is wrong now. Also, the accepted answer does not have any reference that the standard really defines it that way.).</p>