Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Some vs Find vs For [Testing Fok]
(version: 1)
Comparing performance of:
Find vs Some vs FOR
Created:
21 days ago
by:
Guest
Jump to the latest result
Script Preparation code:
var data = [] for (let i = 0; i < 7400; ++i) data.push({ username: 'toto' }) data.push({ username: 'titi' }) for (let i = 0; i < 100; ++i) data.push({ username: 'toto' })
Tests:
Find
data.find(e => e.username === 'titi')
Some
data.some(e => e.username === 'titi')
FOR
function test() { for(let i = 0; i < data.length; i++) { if(data[i].username === 'titi') { return true; } } return false; } test();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Find
Some
FOR
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
21 days ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
Browser/OS:
Chrome 147 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Find
28089.2 Ops/sec
Some
32795.2 Ops/sec
FOR
35970.2 Ops/sec
Related benchmarks:
Some vs Find
Some vs Find II
Some vs Find small sample
Some vs Find vs For
Teste some vs find
find vs some longer
Some vs Find 2
Some vs Find test2
Some vs Find2
Comments
Confirm delete:
Do you really want to delete benchmark?