Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
variable vs property
(version: 0)
Comparing performance of:
variable vs property
Created:
2 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
const obj = { a: 1, b: 100, c: 1000000 }; const { a, b, c } = obj;
Tests:
variable
let r1 = 0; for (let i = 0; i < 100; i++) { r1 = r1 + a + b + c + i; } r1;
property
let r2 = 0; for (let i = 0; i < 100; i++) { r2 = r2 + obj.a + obj.b + obj.c + i; } r2;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
variable
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?