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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0
Browser:
Chrome 133
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Splice
31.0M/s
Slice
8.1M/s
Shift
1.8M/s
Move Indexes
331K/s
View exact numbers
Test name
Executions per second
✓
Splice
30,980,436 Ops/sec
Slice
8,068,348 Ops/sec
Shift
1,846,789 Ops/sec
Move Indexes
330,825 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);