Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
es6 class static vs instance vs object method
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 12; Mobile; rv:149.0) Gecko/149.0 Firefox/149.0
Browser:
Firefox Mobile 149
Operating system:
Android
Device Platform:
Mobile
Date tested:
4 months ago
object
583.4M/s
function
583.3M/s
instance
582.3M/s
static
562.9M/s
View exact numbers
Test name
Executions per second
✓
object
583,389,376 Ops/sec
function
583,290,944 Ops/sec
instance
582,341,824 Ops/sec
static
562,930,368 Ops/sec
Script Preparation code:
function bar() {} var object = { bar() {} } var Foo = class Foo { static bar() {} constructor () {} bar() {} } var foo = new Foo()
Tests:
function
bar();
object
object.bar();
static
Foo.bar();
instance
foo.bar();