string comparison

Benchmark created on


Setup

const a = 'hello'
const b = 'world'

const customStringComparison = (a, b) => (a > b ? 1 : -1)

Test runner

Ready to run.

Testing in
TestOps/sec
Custom function
customStringComparison(a, b)
ready
localeCompare
a.localeCompare(b)
ready

Revisions

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