{"ScriptPreparationCode":"window.iterations = 100000;","TestCases":[{"Name":"OOP","Code":" class Obj {\r\n constructor(x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.result = x \u002B y \u002B z;\r\n }\r\n\r\n update(x, y, z) {\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.result = x \u002B y \u002B z;\r\n }\r\n }\r\n\r\n\tconst OOP = [];\r\n\r\n for (let i = 0; i \u003C iterations; i\u002B\u002B ) {\r\n OOP.push(new Obj(Math.random(), Math.random(), Math.random()));\r\n };\r\n \r\n for (let i = 0; i \u003C iterations; i\u002B\u002B ) {\r\n OOP[i].update(Math.random(), Math.random(), Math.random());\r\n };","IsDeferred":false},{"Name":"FP","Code":" function createObj(x, y, z) {\r\n return {\r\n x,\r\n y,\r\n z,\r\n result: x \u002B y \u002B z\r\n }\r\n }\r\n\r\n function updateObj(obj, x, y, z) {\r\n obj.x = x;\r\n obj.y = y;\r\n obj.z = z;\r\n obj.result = x \u002B y \u002B z;\r\n }\r\n\r\n\tconst FP = [];\r\n\r\n for (let i = 0; i \u003C iterations; i\u002B\u002B ) {\r\n FP.push(createObj(Math.random(), Math.random(), Math.random()));\r\n };\r\n \r\n for (let i = 0; i \u003C iterations; i\u002B\u002B ) {\r\n updateObj(FP[i], Math.random(), Math.random(), Math.random());\r\n };","IsDeferred":false},{"Name":"Fake OOP","Code":" function createObj(x, y, z) {\r\n return {\r\n x,\r\n y,\r\n z,\r\n result: x \u002B y \u002B z\r\n }\r\n }\r\n\r\n function updateObj(obj, x, y, z) {\r\n obj.x = x;\r\n obj.y = y;\r\n obj.z = z;\r\n obj.result = x \u002B y \u002B z;\r\n }\r\n\r\n const FakeOOP = [];\r\n \r\n for (let i = 0; i \u003C iterations; i\u002B\u002B ) {\r\n const obj = createObj(Math.random(), Math.random(), Math.random());\r\n obj.update = (x, y, z) =\u003E updateObj(obj, x, y, z);\r\n FakeOOP.push(obj);\r\n };\r\n \r\n for (let i = 0; i \u003C iterations; i\u002B\u002B ) {\r\n FakeOOP[i].update(Math.random(), Math.random(), Math.random());\r\n };","IsDeferred":false},{"Name":"Fake OOP2","Code":" function createObj(x, y, z) {\r\n return {\r\n x,\r\n y,\r\n z,\r\n result: x \u002B y \u002B z\r\n }\r\n }\r\n\r\n function updateObj(obj, x, y, z) {\r\n obj.x = x;\r\n obj.y = y;\r\n obj.z = z;\r\n obj.result = x \u002B y \u002B z;\r\n }\r\n\r\n\tclass Obj2 {\r\n constructor(x, y, z) {\r\n this.obj = createObj(x, y, z);\r\n }\r\n\r\n update(x, y, z) {\r\n updateObj(this.obj, x, y, z);\r\n }\r\n }\r\n\r\n const FakeOOP2 = [];\r\n \r\n for (let i = 0; i \u003C iterations; i\u002B\u002B ) {\r\n FakeOOP2.push(new Obj2(Math.random(), Math.random(), Math.random()));\r\n };\r\n \r\n for (let i = 0; i \u003C iterations; i\u002B\u002B ) {\r\n FakeOOP2[i].update(Math.random(), Math.random(), Math.random());\r\n };","IsDeferred":false}]}