{"ScriptPreparationCode":"const arr = []\r\n\r\nfor (let i = 1; i \u003C= 100000; i\u002B\u002B) {\r\n arr.push(\u0022element \u0022 \u002B i)\r\n}\r\n\r\nfunction move1(from, to) {\r\n arr.splice(to, 0, arr.splice(from, 1)[0]);\r\n}\r\n\r\nfunction move2(from) {\r\n return [ arr[from], ...arr.filter((el, i) =\u003E i !== from) ]\r\n}\r\n\r\nfunction move3(from) {\r\n return [ ...arr.filter((el, i) =\u003E i !== from), arr[from] ]\r\n}\r\n\r\nfunction move4(from, to) {\r\n const testArr = arr.slice(0)\r\n testArr.splice(to, 0, testArr.splice(from, 1)[0])\r\n return testArr\r\n}","TestCases":[{"Name":"Universal move to start","Code":"for (let i = 1; i \u003C= 1000; i\u002B\u002B) {\r\n move1(4999, 0)\r\n}","IsDeferred":false},{"Name":"Universal move to end","Code":"for (let i = 1; i \u003C= 1000; i\u002B\u002B) {\r\n move1(4999, 0)\r\n}","IsDeferred":false},{"Name":"Move to start","Code":"for (let i = 1; i \u003C= 1000; i\u002B\u002B) {\r\n move2(4999)\r\n}","IsDeferred":false},{"Name":"Move to end","Code":"for (let i = 1; i \u003C= 1000; i\u002B\u002B) {\r\n move3(4999)\r\n}","IsDeferred":false},{"Name":"Universal move to start (new array)","Code":"for (let i = 1; i \u003C= 1000; i\u002B\u002B) {\r\n move4(4999, 0)\r\n}","IsDeferred":false},{"Name":"Universal move to end (new array)","Code":"for (let i = 1; i \u003C= 1000; i\u002B\u002B) {\r\n move4(4999, 100000 - 1)\r\n}","IsDeferred":false}]}