Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
equality vs includes
how much of a performance deficit you can expect from using Array.includes instead of writing an equality check
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:142.0) Gecko/20100101 Firefox/142.0
Browser:
Firefox 142
Operating system:
Windows
Device Platform:
Desktop
Date tested:
11 months ago
Or chain
1580.7M/s
Array.includes
61.0M/s
View exact numbers
Test name
Executions per second
✓
Or chain
1,580,741,120 Ops/sec
Array.includes
60,960,072 Ops/sec
Script Preparation code:
var stringToMatch = 'hello';
Tests:
Array.includes
['banana'].includes(stringToMatch)
Or chain
stringToMatch === 'banana'