{"ScriptPreparationCode":"/*your preparation JavaScript code goes here\r\nTo execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/\r\nasync function globalMeasureThatScriptPrepareFunction() {\r\n // This function is optional, feel free to remove it.\r\n // await someThing();\r\n}","TestCases":[{"Name":"Constructor parameters","Code":"class Component {\r\n constructor(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n }\r\n}\r\n\r\nfor(let i = 0; i \u003C 100000; i\u002B\u002B) {\r\n const component = new Component(i, i);\r\n}","IsDeferred":false},{"Name":"Constructor object","Code":"class Component {\r\n constructor(params) {\r\n const keys = Object.keys(params);\r\n \tfor(let i = 0, l = keys.length; i \u003C l; i\u002B\u002B) {\r\n this[keys[i]] = params[i];\r\n \t}\r\n }\r\n}\r\n\r\nfor(let i = 0; i \u003C 100000; i\u002B\u002B) {\r\n const component = new Component({ x: i, y: i});\r\n}","IsDeferred":false},{"Name":"Factory function with object","Code":"const createComponent = (params) =\u003E {\r\n const component = {};\r\n const keys = Object.keys(params);\r\n for(let i = 0, l = keys.length; i \u003C l; i\u002B\u002B) {\r\n component[keys[i]] = params[i];\r\n }\r\n return component;\r\n}\r\n\r\nfor(let i = 0; i \u003C 100000; i\u002B\u002B) {\r\n const component = createComponent({ x: i, y: i});\r\n}","IsDeferred":false},{"Name":"Factory function with definition and parameters","Code":"const positionComponentDef = {\r\n x: Number,\r\n y: Number,\r\n};\r\n\r\nconst createComponent= (def, ...params) =\u003E {\r\n const component = {};\r\n const keys = Object.keys(def);\r\n for(let i = 0, l = keys.length; i \u003C l; i\u002B\u002B) {\r\n component[keys[i]] = params[i];\r\n }\r\n return component;\r\n}\r\n\r\nfor(let i = 0; i \u003C 100000; i\u002B\u002B) {\r\n const component = createComponent(positionComponentDef, i, i);\r\n}","IsDeferred":false}]}