Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
sparse arrays test
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Browser:
Chrome 121
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
no sparse arrays
33307176.0 Ops/sec
no sparse arrays with -1 idx
4605016.5 Ops/sec
sparse array
15215431.0 Ops/sec
Tests:
no sparse arrays
var s = []; s[0] = 0; s[1] = 1; s[2] = 2; s[3] = 3; s[4] = 4; s[5] = 5;
no sparse arrays with -1 idx
var s = []; s[-1] = 0; s[0] = 1; s[1] = 2; s[2] = 3; s[3] = 4; s[4] = 5;
sparse array
var s = []; s[0] = 0; s[3] = 1; s[5] = 2; s[6] = 3; s[9] = 4; s[20] = 5;