Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Tuple versus Object for function return 01
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 148
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 months ago
Object
3K/s
Tuple
1K/s
View exact numbers
Test name
Executions per second
✓
Object
3,356 Ops/sec
Tuple
1,162 Ops/sec
Script Preparation code:
var COUNT = 100000
Tests:
Tuple
function now() { return [5612356223, 3] } for(let i = 0; i < COUNT; i++) { let [a, b] = now() }
Object
function now() { return {a:5612356223, b:3} } for(let i = 0; i < COUNT; i++) { let {a, b} = now() }