DEV Community

Discussion on: Common Sorting Algorithms in JavaScript

Collapse
 
functional_js profile image
Functional Javascript • Edited

I perf-tested these locally.

An example usage per func...

//@perftests
const aNums = genRandNums(1, 1e4, 1e6);
timeInLoop("mergeSort", 1, () => mergeSort(aNums));

genRandNums Source Code

gist.github.com/funfunction/f7adf6...

timeInLoop Source Code

gist.github.com/funfunction/91b587...

Thread Thread
 
christinamcmahon profile image
Christina

Oh this is awesome, thanks for sharing!