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_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser:
Chrome 133
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Move Indexes
399598.6 Ops/sec
Shift
2348497.8 Ops/sec
Splice
54122804.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);