Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Multiple shift versus Index
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/132.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 132
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Move Indexes
324687.1 Ops/sec
Shift
1771431.9 Ops/sec
Splice
61093568.0 Ops/sec
Slice
5063111.0 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const list = new Array(1000).fill("value"); const list2 = new Array(1000).fill("value"); const list3 = new Array(1000).fill("value"); const list4 = new Array(1000).fill("value");
Tests:
Move Indexes
let i = 100; while (i < 1000) { list[i - 100] = list[i]; i++; } list.length = 900;
Shift
let i = 0; while (i < 100) { list2.shift(); i++; }
Splice
list3.splice(0, 100);
Slice
list4.slice(100);