Sorting Performance (v2)

Revision 2 of this 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.localeCompare(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.