DEV Community


Discussion on: Common Sorting Algorithms in JavaScript

functional_js profile image
Functional Javascript • Edited

I perf-tested these locally.

An example usage per func...

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

genRandNums Source Code

timeInLoop Source Code

Thread Thread
christinamcmahon profile image
Christina Author

Oh this is awesome, thanks for sharing!

Forem Open with the Forem app