Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array Some vs Map + Includes
(version: 1)
Comparing performance of: Array.some vs Array.map + Array.includes
Comparing performance of:
Some vs Map + Includes
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
const list = []; for (var i = 0; i < 10000; i++) { list.push({ email: `random${i}@random.com` }) }
Tests:
Some
const testEmail = "random9999@random.com"; const result = list.some(({ email }) => email === testEmail);
Map + Includes
const testEmail = "random9999@random.com"; const result = list.map(({ email }) => email).includes(testEmail);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Some
Map + Includes
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser/OS:
Chrome 131 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Some
25387.1 Ops/sec
Map + Includes
15499.1 Ops/sec
Related benchmarks:
For loop map vs map builtin for 100000 elements
comparing push vs spread one by one
spread vs push 2
Object direct vs Array.indexOf vs Array.find vs Map.has
JS join vs map
map.set vs array.push
Array.find vs Map
.map() vs for-of + push
Array loop vs foreach vs map forsk
Comments
Confirm delete:
Do you really want to delete benchmark?