Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Javascript: Case insensitive string comparison performance
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:104.0) Gecko/20100101 Firefox/104.0
Browser:
Firefox 104
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
toLowerCase()
1353874944.0 Ops/sec
localeCompare()
339433.2 Ops/sec
toLowerCase() FAIL
1366059008.0 Ops/sec
localeCompare() FAIL
337272.3 Ops/sec
Script Preparation code:
var a = "John Doe" var b = "john doe" var c = "john smith" var o = { sensitivity: 'base' }
Tests:
toLowerCase()
a.toLowerCase() === b.toLowerCase()
localeCompare()
a.localeCompare(b,undefined,o)
toLowerCase() FAIL
c.toLowerCase() === b.toLowerCase()
localeCompare() FAIL
c.localeCompare(b,undefined,o)