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
Test name
Executions per second
function
103208936.0 Ops/sec
object
113139160.0 Ops/sec
static
113208712.0 Ops/sec
instance
107161640.0 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();