You set up your array only once for each test, and therefore only the first iteration of the shift test has any data to work with. The following iterations have an empty array left over from the first iteration, and immediately terminate.
Here is a fixed set of tests where mutation algorithms work on a copy of the data. The shift algorithm is expected to be the last in performance.
lanzz
source share