Skip to content

Instantly share code, notes, and snippets.

@thgreasi
thgreasi / sortWithParam.js
Created December 26, 2013 20:14
superFastSort with sorting function
function superFastSort(t, sortfunction, start, len) {
"use strict";
if (!sortfunction || typeof sortfunction !== 'function') {
sortfunction = function(a, b) {
return a - b;
};
}
if (start === undefined) {
@thgreasi
thgreasi / superFastSort.js
Last active December 27, 2015 08:09
superFastSort.js
function superFastSort ( t , start, len ) {
"use strict";
if (start === undefined) {
start = 0;
}
if (len === undefined) {
len = t.length - start;
}
if (len > 1) {