field vs property2344
field vs property
Date tested:
one year ago
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Test name
Executions per second
lodash
1010928640.0 Ops/sec
native
1010090880.0 Ops/sec
Benchmark definition (click to collapse):
Script Preparation code:
class MyClass { constructor() { this.field = 1; } set field_value(val) { this.field = val; } get field_value() { return this.field; } } var theInstance = new MyClass();
Tests:
lodash
;
native
;
Open this result on MeasureThat.net