{"ScriptPreparationCode":"function Xoroshiro128Plus(options) {\r\n let {\r\n state\r\n } = options || {};\r\n\r\n if (!state) {\r\n let time = (Date.now() | 0) \u003E\u003E\u003E 0;\r\n state = [\r\n (time \u0026 ((Math.random() * 0xffffffff) | 0)) \u003E\u003E\u003E 0,\r\n (time \u0026 ((Math.random() * 0xffffffff) | 0)) \u003E\u003E\u003E 0,\r\n (time \u0026 ((Math.random() * 0xffffffff) | 0)) \u003E\u003E\u003E 0,\r\n (time \u0026 ((Math.random() * 0xffffffff) | 0)) \u003E\u003E\u003E 0,\r\n ];\r\n }\r\n\r\n this.next64 = () =\u003E xoroshiro128plus(state);\r\n this.getState = () =\u003E state.slice();\r\n}\r\n\r\nfunction xoroshiro128plus(state) {\r\n let s0 = [state[0], state[1]];\r\n let s1 = [state[2], state[3]];\r\n\r\n let result = sum64(s0, s1);\r\n\r\n s1 = xor64(s1, s0);\r\n let [a, b] = xor64(\r\n xor64(or64(shiftLeft64(s0, 55), shiftRight64(s0, 9)), s1),\r\n shiftLeft64(s1, 14),\r\n );\r\n let [c, d] = or64(shiftLeft64(s1, 36), shiftRight64(s1, 28));\r\n\r\n state[0] = a;\r\n state[1] = b;\r\n state[2] = c;\r\n state[3] = d;\r\n\r\n return result;\r\n\r\n function shiftLeft64([x, y], count) {\r\n // \u006032\u0060 case is not handled\r\n if (count \u003C 32) {\r\n x = x \u003C\u003C count;\r\n let a = (y \u003E\u003E\u003E (32 - count)) \u0026 (Math.pow(2, count) - 1);\r\n x \u002B= a;\r\n return [x \u003E\u003E\u003E 0, (y \u003C\u003C count) \u003E\u003E\u003E 0];\r\n } else {\r\n x = (y \u0026 (Math.pow(2, 64 - count) - 1)) \u003C\u003C (count - 32);\r\n return [x \u003E\u003E\u003E 0, 0];\r\n }\r\n }\r\n\r\n function shiftRight64([x, y], count) {\r\n // \u006032\u0060 case is not handled\r\n if (count \u003C 32) {\r\n let a = x \u0026 (Math.pow(2, count) - 1);\r\n y = (y \u003E\u003E\u003E count) \u002B (a \u003C\u003C (32 - count));\r\n return [x \u003E\u003E\u003E count, y \u003E\u003E\u003E 0];\r\n } else {\r\n let a = (x \u003E\u003E (count - 32)) \u0026 (Math.pow(2, 64 - count) - 1);\r\n x = (x \u003E\u003E (count - 32)) \u0026 (Math.pow(2, 64 - count) - 1);\r\n x = x \u002B (a \u003C\u003C (count - 32));\r\n return [0, x \u003E\u003E\u003E 0];\r\n }\r\n }\r\n\r\n function or64([a0, a1], [b0, b1]) {\r\n return [(a0 | b0) \u003E\u003E\u003E 0, (a1 | b1) \u003E\u003E\u003E 0];\r\n }\r\n\r\n function xor64([a0, a1], [b0, b1]) {\r\n return [(a0 ^ b0) \u003E\u003E\u003E 0, (a1 ^ b1) \u003E\u003E\u003E 0];\r\n }\r\n\r\n function sum64([a0, a1], [b0, b1]) {\r\n let [y, overflow] = sum32(a1, b1);\r\n let x = (a0 \u002B b0 \u002B (overflow ? 1 : 0)) \u003E\u003E\u003E 0;\r\n return [x, y];\r\n }\r\n\r\n function sum32(a, b) {\r\n let overflow = false;\r\n\r\n let max = 0xffffffff;\r\n max -= a;\r\n\r\n if (b \u003E max) {\r\n overflow = true;\r\n }\r\n\r\n return [(a \u002B b) \u003E\u003E\u003E 0, overflow];\r\n }\r\n}\r\n\r\nvar random = new Xoroshiro128Plus({\r\n state: [1292125120, -349674120, 855278889, 359289241]\r\n});\r\n\r\nvar ELEMENTS_COUNT = 1000;\r\nvar FIELDS_COUNT = 10;\r\n\r\nvar items = [];\r\n\r\nfor (let i = 0; i \u003C ELEMENTS_COUNT; i\u002B\u002B) {\r\n var [zIndex, bits] = random.next64();\r\n\r\n var obj = {\r\n zIndex\r\n };\r\n\r\n for (let j = 1; j \u003C= FIELDS_COUNT; j\u002B\u002B) {\r\n obj[\u0060prop${j}\u0060] = Boolean((bits \u003E\u003E (j - 1)) \u0026 1);\r\n }\r\n\r\n items.push(obj);\r\n}\r\n\r\nvar keys = [\r\n \u0022prop1\u0022,\r\n \u0022prop2\u0022,\r\n \u0022prop3\u0022,\r\n \u0022prop4\u0022,\r\n \u0022prop5\u0022,\r\n \u0022prop6\u0022,\r\n \u0022prop7\u0022,\r\n \u0022prop8\u0022,\r\n \u0022prop9\u0022,\r\n \u0022prop10\u0022,\r\n];","TestCases":[{"Name":"findIndex","Code":"return items.findIndex(item =\u003E item.prop7)","IsDeferred":false},{"Name":"for loop","Code":"var i = 0;\r\nvar length = items.length;\r\n\r\nfor (; i \u003C length; i\u002B\u002B) {\r\n if (items[i].prop7) {\r\n \treturn i;\r\n }\r\n}\r\n\r\n","IsDeferred":false}]}