JavaScript performance comparison Test case created by a on 2014-8-25 Preparation code <script> Benchmark.prototype.setup = function() { var inputArray = Array.apply(null, new Array(1e4)).map(function(e) { return ~~(Math.random() * 1e4); }); function quickSort(array) { var sorted = array.slice(0); return (function sort(left, right) { if (left < right) { var pivot = sorted[(left + right) >> 1]; var