Sorting Performance

Benchmark created on


Description

Checking if the inbuilt .sort() is faster than a our own sort.

Setup

const letterList = ["c", "b", "g", "f", "n"];

Test runner

Ready to run.

Testing in
TestOps/sec
Function sort
console.log(letterList.slice().sort((a, b) => a - b));
ready
.sort() Test
console.log(letterList.sort())
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.