Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
direct vs indirect var return
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Browser:
Chrome 130
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
indirect 1
20809578.0 Ops/sec
indirect 2
22438668.0 Ops/sec
direct
22288772.0 Ops/sec
Script Preparation code:
const getValueDirect = function() { return 1; }; const getValueIndirect1 = function() { return getValueDirect(); } const getValueIndirect2 = function() { return getValueIndirect1(); }
Tests:
indirect 1
const myValue1 = getValueIndirect1();
indirect 2
const myValue2 = getValueIndirect2();
direct
const myValue3 = getValueDirect();