Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Property assignment vs Variable assignment
The significance is function oriented vs object orient approach to building UI
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/143.0.0.0 Safari/537.36 Edg/143.0.0.0
Browser:
Chrome 143
Operating system:
Windows
Device Platform:
Desktop
Date tested:
6 months ago
Test name
Executions per second
Function approach
7038424.0 Ops/sec
Object approach
7006777.0 Ops/sec
Script Preparation code:
function createFunctionBench() { let value = null; return function closure(val) { if (val) { value = val; } return value; }; } class ClassBench { update(val) { if (val) { this.value = val; } return this.value; } } bench = { fn: createFunctionBench(), cls: new ClassBench() };
Tests:
Function approach
bench.fn(performance.now());
Object approach
bench.cls.update(performance.now());