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 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1
Browser:
Mobile Safari 26
Operating system:
iOS 18.7
Device Platform:
Mobile
Date tested:
6 months ago
Benchmark engine:
Benchmark.js
toLowerCase()
284.5M/s
toLowerCase() FAIL
252.3M/s
localeCompare()
199K/s
localeCompare() FAIL
176K/s
View exact numbers
Test name
Executions per second
✓
toLowerCase()
284,492,544 Ops/sec
toLowerCase() FAIL
252,288,192 Ops/sec
localeCompare()
198,610 Ops/sec
localeCompare() FAIL
176,212 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)