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
indirect 1
19.4M/s
indirect 2
19.2M/s
direct
19.2M/s
View exact numbers
Test name
Executions per second
✓
indirect 1
19,417,612 Ops/sec
indirect 2
19,229,366 Ops/sec
direct
19,222,208 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();