Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Const with props vs Function
(version: 1)
Comparing performance of:
const vs const with property vs function vs function with property
Created:
one year ago
by:
Guest
Jump to the latest result
Tests:
const
const fun = ()=>{let a = 1}; for (let i = 0; i < 1000000; i++) fun();
const with property
const fun = Object.freeze(Object.assign(()=>{let a = 1}, { fun: true })); for (let i = 0; i < 1000000; i++) fun();
function
function fun(){let a = 1} for (let i = 0; i < 1000000; i++) fun();
function with property
function fun(){let a = 1} fun.fun = true; for (let i = 0; i < 1000000; i++) fun();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
const
const with property
function
function with property
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?