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/142.0.0.0 Safari/537.36
Browser:
Chrome 142
Operating system:
Linux
Device Platform:
Desktop
Date tested:
7 months ago
Test name
Executions per second
indirect 1
237989008.0 Ops/sec
indirect 2
221528688.0 Ops/sec
direct
225247376.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();