{"ScriptPreparationCode":"const numTests = 10000;\r\nconst el = document.getElementById(\u0022benchmark\u0022);\r\nconst css = (new Array(numTests)).fill(0).map(() =\u003E ({\r\n \u0022opacity\u0022: \u0060${Math.random()}\u0060,\r\n \u0022zIndex\u0022: \u0060${Math.floor(Math.random() * 1000)}\u0060\r\n}));","TestCases":[{"Name":"setProperty","Code":"let i = 0;\r\n\r\nwhile (i \u003C numTests) {\r\n for (const s in css[i]) {\r\n el.style.setProperty(s.replace(/([a-z][A-Z])/g, (m) =\u003E m[0] \u002B \u0022-\u0022 \u002B m[1].toLowerCase()), css[i][s]);\r\n }\r\n i\u002B\u002B;\r\n}","IsDeferred":false},{"Name":"Object.assign","Code":"let i = 0;\r\n\r\nwhile (i \u003C numTests) {\r\n Object.assign(el.style, css[i]);\r\n i\u002B\u002B;\r\n}","IsDeferred":false},{"Name":".style","Code":"let i = 0;\r\n\r\nwhile (i \u003C numTests) {\r\n for (const s in css[i]) {\r\n el.style[s] = css[i][s];\r\n }\r\n i\u002B\u002B;\r\n}","IsDeferred":false},{"Name":".cssText","Code":"let i = 0;\r\n\r\nwhile (i \u003C numTests) {\r\n console.log(i, css[i]);\r\n\tconst s = Object.entries(css[i]).map(([key, value]) =\u003E \u0060${key}:${value}\u0060).join(\u0022;\u0022);\r\n \tel.style.cssText \u002B= s;\r\n i\u002B\u002B;\r\n}","IsDeferred":false}]}