title: Fastest way to move first element to the end of an Array
body: <p>I'm wondering what is the fastest way in JavaScript to move an element from the beginning of an <code>Array</code> to the end. For example if we have</p>
  
  <p><code>[8,1,2,3,4,5,6,7]</code></p>
  
  <p>And we want: <code>[1,2,3,4,5,6,7,8]</code></p>
  
  <p>I want to move the first element to the end. I was thinking about switching element 0 with element 1, after that switching element 1 with element 2 and so on until the 8 is at the and (basically how bubblesort works). I was wondering if there is a faster way to bring the first element to the end.</p>
  
  <p>I will be using small Arrays (around 10 elements), and I want to avoid <code>shift()</code> since it's pretty slow.</p>
  
  <p>This is what I have now on chrome it's 45% faster than normal shift+push: <a href="http://jsperf.com/shift-myfunc" rel="noreferrer">http://jsperf.com/shift-myfunc</a></p>
  
  <p>The arrays will have objects in them for a game.</p>