{"ScriptPreparationCode":null,"TestCases":[{"Name":"function","Code":"function Vector(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n \r\n this.dot = function(other) {\r\n return this.x * other.x \u002B this.y * other.y;\r\n }\r\n}\r\n\r\nlet i = 1000;\r\nlet a = new Vector(0.5, 0.3);\r\nlet b = new Vector(0.21, 0.63);\r\nlet c = 0;\r\nwhile(--i) {\r\n c \u002B= a.dot(b);\r\n}\r\nreturn c;","IsDeferred":false},{"Name":"prototype","Code":"function Vector(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n}\r\n\r\nVector.prototype.dot = function(other) {\r\n return this.x * other.x \u002B this.y * other.y;\r\n }\r\n\r\nlet i = 1000;\r\nlet a = new Vector(0.5, 0.3);\r\nlet b = new Vector(0.21, 0.63);\r\nlet c = 0;\r\nwhile(--i) {\r\n c \u002B= a.dot(b);\r\n}\r\nreturn c;","IsDeferred":false},{"Name":"class","Code":"class Vector {\r\n constructor(x, y) {\r\n this.x = x;\r\n \tthis.y = y;\r\n }\r\n \r\n dot(other) {\r\n return this.x * other.x \u002B this.y * other.y;\r\n }\r\n}\r\n\r\nlet i = 1000;\r\nlet a = new Vector(0.5, 0.3);\r\nlet b = new Vector(0.21, 0.63);\r\nlet c = 0;\r\nwhile(--i) {\r\n c \u002B= a.dot(b);\r\n}\r\nreturn c;","IsDeferred":false}]}