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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36 Edg/135.0.0.0
Browser:
Chrome 135
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
static
113.2M/s
object
113.1M/s
instance
107.2M/s
function
103.2M/s
View exact numbers
Test name
Executions per second
✓
static
113,208,712 Ops/sec
object
113,139,160 Ops/sec
instance
107,161,640 Ops/sec
function
103,208,936 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();