Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
private/public class proprty access
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 138
Operating system:
Android
Device Platform:
Mobile
Date tested:
9 months ago
Test name
Executions per second
private
2885.3 Ops/sec
public
5114.6 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
private
class MyClass { #_propertyOne = 1; #_propertyTwo = 2; #_sum = 0; sumProperties() { let sum = 0; for (let i = 0; i < 10_000; i++) sum += this.#_propertyOne + this.#_propertyTwo; } } new MyClass().sumProperties();
public
class MyClass { _propertyOne = 1; _propertyTwo = 2; sumProperties() { let sum = 0; for (let i = 0; i < 10_000; i++) sum += this._propertyOne + this._propertyTwo; } } new MyClass().sumProperties();