Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array of object Filter 2
(version: 0)
Comparing performance of:
Lead vs Tail
Created:
one year ago
by:
Registered User
Jump to the latest result
Script Preparation code:
const people = Array.from({ length: 10000 }, (_, i) => ({ id: i, name: `Person ${i}`, age: Math.floor(Math.random() * 80) + 20 }));
Tests:
Lead
return people.filter(person => person.age >= 30);
Tail
const result = []; for (let i = 0; i < people.length; i++) { if (people[i].age >= 30) { result.push(people[i]); } } return result;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Lead
Tail
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?