Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Are function calls bad
(version: 0)
Comparing performance of:
Plain vs With function
Created:
2 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
window.fn = (num) => num + 1 window.a = Array(1_000_000).flatMap(() => [1, 2, 3, 4, 5]);
Tests:
Plain
let last; for(let i = 0; i < a.length; i++){ last = i + 1; }
With function
let last; for(let i = 0; i < a.length; i++){ last = fn(i); }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Plain
With function
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?