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 (Windows NT 10.0; Win64; x64; rv:140.0) Gecko/20100101 Firefox/140.0
Browser:
Firefox 140
Operating system:
Windows
Device Platform:
Desktop
Date tested:
11 months ago
instance
1072.7M/s
static
799.5M/s
object
790.9M/s
function
674.6M/s
View exact numbers
Test name
Executions per second
✓
instance
1,072,660,864 Ops/sec
static
799,477,120 Ops/sec
object
790,917,376 Ops/sec
function
674,554,880 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();