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 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Firefox/128.0
Browser:
Firefox 128
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Move Indexes
678783.4 Ops/sec
Shift
3159371.2 Ops/sec
Splice
37931484.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);