Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
string includes case-insensitively
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
Browser:
Chrome 148
Operating system:
Windows
Device Platform:
Desktop
Date tested:
7 hours ago
Test name
Executions per second
includes toLocaleLowerCase
22431098.0 Ops/sec
regexp test case insensitivly
15370610.0 Ops/sec
Script Preparation code:
const values = [ 'a', 'b', 'c', 'Z', 'Y', '1', '2', ]; const hello = 'Hello'.toLocaleLowerCase(); const rello = /Hello/i;
Tests:
includes toLocaleLowerCase
values.some(v => v.toLocaleLowerCase().includes(hello));
regexp test case insensitivly
values.some(v => rello.test(v));