Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
call vs [method] vs direct
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
Browser:
Firefox 131
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
call
317657184.0 Ops/sec
[method]
315774944.0 Ops/sec
direct
322568704.0 Ops/sec
Script Preparation code:
var object = { count: 0, sum: function(value) { this.count += value; } }; function one(value, method) { method.call(object, value); } function two(value, method) { object[method](value); } function three(value) { object.sum(value); }
Tests:
call
count = 0; one(10.5, object.sum);
[method]
count = 0; two(10.5, "sum");
direct
count = 0; three(10.5);