{"ScriptPreparationCode":"var reused = {\r\n\tcolor: [1, 1, 1, 1],\r\n \tposition: [1, 1],\r\n};\r\n\r\nvar map = new Map();\r\nfor (let i = 0; i \u003C 1000000; i \u002B= 1) {\r\n\tmap.set(\u0060${i}\u0060, {\r\n\t color: [1, 1, 1, 1],\r\n\t position: [1, 1],\r\n size: 99, // dummy key\r\n\t}); \r\n}\r\n","TestCases":[{"Name":"allocate","Code":"for (let i = 0; i \u003C 10000; i \u002B= 1) {\r\n\tconst target = map.get(\u0060${i}\u0060);\r\n \tObject.assign(target, {\r\n \tcolor: [i, i, i, i],\r\n \tposition: [i, i],\r\n });\r\n}","IsDeferred":false},{"Name":"reuse","Code":"for (let i = 0; i \u003C 10000; i \u002B= 1) {\r\n\tconst target = map.get(\u0060${i}\u0060);\r\n \treused = {\r\n color: [i, i, i, i],\r\n position: [i, i],\r\n };\r\n \tObject.assign(target, reused);\r\n}","IsDeferred":false},{"Name":"without object.assign (allocate)","Code":"for (let i = 0; i \u003C 10000; i \u002B= 1) {\r\n\tconst target = map.get(\u0060${i}\u0060);\r\n \tconst newObj = {\r\n color: [i, i, i, i],\r\n position: [i, i],\r\n };\r\n\ttarget.color = newObj.color;\r\n \ttarget.position = newObj.position;\r\n}","IsDeferred":false},{"Name":"without object.assign (re-used)","Code":"for (let i = 0; i \u003C 10000; i \u002B= 1) {\r\n\tconst target = map.get(\u0060${i}\u0060);\r\n \treused = {\r\n color: [i, i, i, i],\r\n position: [i, i],\r\n };\r\n \ttarget.color = reused.color;\r\n \ttarget.position = reused.position;\r\n}","IsDeferred":false}]}