Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
invoke bound function vs invoke closure
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 10; Mobile; rv:128.0) Gecko/128.0 Firefox/128.0
Browser:
Firefox Mobile 128
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
invoke bound
4869898.5 Ops/sec
invoke closure
21851992.0 Ops/sec
invoke boundThis
4846871.0 Ops/sec
Script Preparation code:
var a = {v : Math.random()} var bound = (function(a_) { a_.v = Math.imul(2, a_.v); }).bind(null, a); var boundThis = (function() { this.v = Math.imul(2, this.v); }).bind(a); var closure = (function() { const a_ = a; return function() { a_.v = Math.imul(2, a_.v); }; })();
Tests:
invoke bound
bound();
invoke closure
closure();
invoke boundThis
boundThis();