var nullProto = Object.create( null );
nullProto.value = 0;
var frozen = Object.freeze( {
_value: 0,
get value() {
return this._value;
},
set value(x) {
this._value = x
},
getValue() {
return this._value
},
setValue(x) {
this._value = x
}
} );
class Private {
#value = 0;
constructor() {
this.#value = 1
}
get value() {
return this.#value
}
set value(x) {
this.#value = x
}
getValue() {
return this.#value
}
setValue(x) {
this.#value = x
}
}
class Public {
value = 0;
constructor() {
this.value = 1
}
get value() {
return this.value
}
set value(x) {
this.value = x
}
getValue() {
return this.value
}
setValue(x) {
this.value = x
}
}
var private = new Private();
var public = new Public();
var val = 0;
val = public.value;
val = public.getValue();
public.value = 1;
public.setValue(1);
val = private.value;
val = private.getValue();
private.value = 2;
private.setValue(2);
nullProto.value = 3;
val = nullProto.value;
val = frozen.value;
frozen.value = 4;
val = frozen.getValue();
val = frozen.setValue( 4 );
--enable-precise-memory-info
flag.
Test case name | Result |
---|---|
Public ES6 property (get) | |
Public Getter function | |
Public ES6 property (set) | |
Public Setter function | |
Private ES6 property (get) | |
Private Getter function | |
Private ES6 property (set) | |
Private Setter function | |
Null Prototype Directly Set | |
Null Prototype Directly Get | |
Frozen Object Literal (Get) | |
Frozen Object Literal (Set) | |
Frozen Object Literal Getter Function | |
Frozen Object Literal Setter Function; |
Test name | Executions per second |
---|---|
Public ES6 property (get) | 287119840.0 Ops/sec |
Public Getter function | 225521968.0 Ops/sec |
Public ES6 property (set) | 381688032.0 Ops/sec |
Public Setter function | 421710496.0 Ops/sec |
Private ES6 property (get) | 284741632.0 Ops/sec |
Private Getter function | 187699088.0 Ops/sec |
Private ES6 property (set) | 379605824.0 Ops/sec |
Private Setter function | 379377376.0 Ops/sec |
Null Prototype Directly Set | 419596448.0 Ops/sec |
Null Prototype Directly Get | 291660736.0 Ops/sec |
Frozen Object Literal (Get) | 287468992.0 Ops/sec |
Frozen Object Literal (Set) | 15857800.0 Ops/sec |
Frozen Object Literal Getter Function | 179343952.0 Ops/sec |
Frozen Object Literal Setter Function; | 14836120.0 Ops/sec |
It looks like we have a JSON object with test results! Let me help you break it down.
From the data, I can see that there are 11 tests being performed on Firefox Mobile 125, which is running on an Android device (version 13). The tests seem to be related to getting and setting properties of objects using different methods, including public getter functions, private setter functions, frozen object literals, and more.
If you'd like, I can try to summarize the test results or provide some insights into what these results might indicate. Alternatively, I can help you with something else entirely!