{"ScriptPreparationCode":"var arr = [];\r\nvar classInstances = [];\r\nvar functionInstances = [];\r\nvar numInstances = 100000;\r\n\r\nfunction addItem(item) {\r\n arr.push(item);\r\n};\r\n\r\nclass TestClass {\r\n constructor() {\r\n }\r\n addItem(item){\r\n this.item = item;\r\n arr.push(this.item)\r\n }\r\n}\r\n\r\nfunction TestFunction() {\r\n}\r\n\r\nTestFunction.prototype.addItem = function(item) {\r\n\t this.item = item;\r\n arr.push(item)\r\n}\r\n\r\nfor( var i = 0; i \u003C numInstances; i\u002B\u002B ) {\r\n classInstances[i] = new TestClass();\r\n functionInstances[i] = new TestFunction();\r\n}","TestCases":[{"Name":"pure function","Code":"arr.length = 0;\r\nfor (var i = 0; i \u003C numInstances; i\u002B\u002B) {\r\n addItem(i);\r\n}","IsDeferred":false},{"Name":"class method","Code":"arr.length = 0;\r\nfor (var i = 0; i \u003C numInstances; i\u002B\u002B) {\r\n classInstances[i].addItem(i);\r\n}","IsDeferred":false},{"Name":"function method","Code":"arr.length = 0;\r\nfor (var i = 0; i \u003C numInstances; i\u002B\u002B) {\r\n functionInstances[i].addItem(i);\r\n}","IsDeferred":false}]}