{"ScriptPreparationCode":" const loremWords = [\r\n \u0027lorem\u0027,\r\n \u0027ipsum\u0027,\r\n \u0027dolor\u0027,\r\n \u0027sit\u0027,\r\n \u0027amet\u0027,\r\n \u0027consectetur\u0027,\r\n \u0027adipiscing\u0027,\r\n \u0027elit\u0027,\r\n \u0027nunc\u0027,\r\n \u0027id\u0027,\r\n \u0027hendrerit\u0027,\r\n \u0027arcu\u0027,\r\n \u0027curabitur\u0027,\r\n \u0027vitae\u0027,\r\n \u0027euismod\u0027,\r\n \u0027justo\u0027,\r\n \u0027cras\u0027,\r\n \u0027libero\u0027,\r\n \u0027dui\u0027,\r\n \u0027scelerisque\u0027,\r\n \u0027a\u0027,\r\n \u0027suscipit\u0027,\r\n \u0027et\u0027,\r\n \u0027bibendum\u0027,\r\n \u0027nec\u0027,\r\n \u0027est\u0027,\r\n \u0027in\u0027,\r\n \u0027maximus\u0027,\r\n \u0027purus\u0027,\r\n \u0027ullamcorper\u0027,\r\n \u0027nulla\u0027,\r\n \u0027blandit\u0027,\r\n \u0027cursus\u0027,\r\n \u0027nullam\u0027,\r\n \u0027sapien\u0027,\r\n \u0027ex\u0027,\r\n \u0027rhoncus\u0027,\r\n \u0027at\u0027,\r\n \u0027auctor\u0027,\r\n \u0027vel\u0027,\r\n \u0027scelerisque\u0027,\r\n \u0027auctor\u0027,\r\n \u0027diam\u0027,\r\n \u0027cras\u0027,\r\n \u0027porta\u0027,\r\n \u0027lorem\u0027,\r\n \u0027non\u0027,\r\n \u0027efficitur\u0027,\r\n \u0027pulvinar\u0027,\r\n \u0027massa\u0027\r\n];\r\n\r\nconst generateLorem = () =\u003E {\r\n const amount = 5 \u002B Math.round(Math.random() * (loremWords.length - 5));\r\n const joined = loremWords.slice(0, amount).join(\u0027 \u0027) \u002B \u0027.\u0027;\r\n return joined[0].toUpperCase() \u002B joined.slice(1);\r\n};\r\n\r\nconst buildItem = (createdAt, id) =\u003E ({\r\n id,\r\n createdAt,\r\n title: \u0060Article ${id \u002B 1}\u0060,\r\n text: generateLorem(),\r\n});\r\n\r\nvar makeExampleData = () =\u003E {\r\n const bool = {\r\n true: true,\r\n false: false,\r\n yes: true,\r\n no: false,\r\n 1: true,\r\n 0: false,\r\n };\r\n \r\n \r\n const articles = Array(1000).fill(Date.now()).map(buildItem);\r\n \r\n const numbers = Array(1000).fill(100).map((x, i) =\u003E x * i);\r\n \r\n const words = Array(1000).fill(loremWords).flat();\r\n \r\n const text = Array(1000).fill(loremWords).flat().join(\u0027 \u0027);\r\n \r\n return {bool, articles, numbers, words, text};\r\n};","TestCases":[{"Name":"Build function","Code":"const buildData = () =\u003E makeExampleData();\r\n\r\nfor (let i = 0; i \u003C 100; i \u002B= 1) {\r\n const newData = buildData();\r\n}","IsDeferred":false},{"Name":"New function, no cache","Code":"for (let i = 0; i \u003C 100; i \u002B= 1) {\r\n const json = JSON.stringify(makeExampleData());\r\n const newData = new Function(\u0027json\u0027, \u0060return json\u0060)(json);\r\n}","IsDeferred":false},{"Name":"New function, cached data","Code":"const data = makeExampleData();\r\n\r\nfor (let i = 0; i \u003C 100; i \u002B= 1) {\r\n const json = JSON.stringify(data);\r\n const newData = new Function(\u0027json\u0027, \u0060return json\u0060)(json);\r\n}","IsDeferred":false},{"Name":"New function, cached stringify","Code":"const json = JSON.stringify(makeExampleData());\r\n\r\nfor (let i = 0; i \u003C 100; i \u002B= 1) {\r\n const newData = new Function(\u0027json\u0027, \u0060return json\u0060)(json);\r\n}","IsDeferred":false},{"Name":"JSON stringify \u0026 parse, no cache","Code":"for (let i = 0; i \u003C 100; i \u002B= 1) {\r\n const json = JSON.stringify(makeExampleData());\r\n const newData = JSON.parse(json);\r\n}","IsDeferred":false},{"Name":"JSON stringify \u0026 parse, cached data","Code":"const data = makeExampleData();\r\n\r\nfor (let i = 0; i \u003C 100; i \u002B= 1) {\r\n const json = JSON.stringify(data);\r\n const newData = JSON.parse(json);\r\n}","IsDeferred":false},{"Name":"JSON stringify \u0026 parse, cached stringify","Code":"const json = JSON.stringify(makeExampleData());\r\n\r\nfor (let i = 0; i \u003C 100; i \u002B= 1) {\r\n const newData = JSON.parse(json);\r\n}","IsDeferred":false}]}