Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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
Benchmark engine:
Benchmark.js
toLowerCase() FAIL
1366.1M/s
toLowerCase()
1353.9M/s
localeCompare()
339K/s
localeCompare() FAIL
337K/s
View exact numbers
Test name
Executions per second
✓
toLowerCase() FAIL
1,366,059,008 Ops/sec
toLowerCase()
1,353,874,944 Ops/sec
localeCompare()
339,433 Ops/sec
localeCompare() FAIL
337,272 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)