{"ScriptPreparationCode":"var arr = [];\r\nvar max = -Infinity;\r\nfor (i = 0; i \u003C 1000; i\u002B\u002B) { \r\n arr.push(Math.random() * i);\r\n}\r\n","TestCases":[{"Name":"Math.max.apply","Code":"max = Math.max.apply(Math, arr);","IsDeferred":false},{"Name":"Math.max with spread","Code":"max = Math.max(...arr);","IsDeferred":false},{"Name":"basic for loop","Code":"for (let i = 0; i \u003C arr.length; i\u002B\u002B) {\r\n if (arr[i] \u003E max) {\r\n max = arr[i];\r\n }\r\n}","IsDeferred":false},{"Name":"for loop length caching","Code":"for (let i = 0, len = arr.length; i \u003C len; i\u002B\u002B) {\r\n if (arr[i] \u003E max) {\r\n max = arr[i];\r\n }\r\n}\r\n","IsDeferred":false}]}