Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
variable vs property (var vs this.property) - v2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Iron Safari/537.36
Browser:
Chrome 109
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
variable
27012.5 Ops/sec
this.property
2332194.2 Ops/sec
window.property
4198.2 Ops/sec
this.variable
2454662.2 Ops/sec
window.variable
4477.8 Ops/sec
Script Preparation code:
var a=123,b=123,c=123; this.d=this.e=this.f=123;
Tests:
variable
for (let i = 0; i < 100; i++) { a + b + c + i; }
this.property
for (let i = 0; i < 100; i++) { this.d + this.e + this.f + i; }
window.property
for (let i = 0; i < 100; i++) { window.d + window.e + window.f + i; }
this.variable
for (let i = 0; i < 100; i++) { this.a + this.b + this.c + i; }
window.variable
for (let i = 0; i < 100; i++) { window.a + window.b + window.c + i; }