{"ScriptPreparationCode":"class Cls {\r\n constructor(foo, bar, baz) {\r\n this.foo = foo;\r\n this.bar = bar;\r\n this.baz = baz;\r\n }\r\n sum() {\r\n return this.foo \u002B this.bar \u002B this.baz;\r\n }\r\n}\r\n\r\nfunction Fn(foo, bar, baz) {\r\n this.foo = foo;\r\n this.bar = bar;\r\n this.baz = baz;\r\n}\r\nFn.prototype.sum = function() {\r\n return this.foo \u002B this.bar \u002B this.baz;\r\n}\r\n\r\nfunction obj(foo, bar, baz) {\r\n return {foo, bar, baz};\r\n}\r\n\r\nfunction sum(x) {\r\n return x.foo \u002B x.bar \u002B x.baz;\r\n}\r\n\r\nfunction sum2() {\r\n return this.foo \u002B this.bar \u002B this.baz;\r\n}\r\n\r\nconst proto = {\r\n sum() {\r\n return this.foo \u002B this.bar \u002B this.baz;\r\n }\r\n}\r\n\r\n\r\nfunction protoCtr(foo, bar, baz) {\r\n return {foo, bar, baz, __proto__: proto };\r\n}\r\n\r\nfunction create(foo, bar, baz) {\r\n let x = Object.create(proto);\r\n x.foo = foo;\r\n x.bar = bar;\r\n x.baz = baz;\r\n return x;\r\n}\r\n\r\nfunction setproto(foo, bar, baz) {\r\n let x = {foo, bar, baz};\r\n Object.setPrototypeOf(x, proto);\r\n return x;\r\n}\r\n\r\nwindow.Cls = Cls\r\nwindow.Fn = Fn\r\nwindow.obj = obj\r\nwindow.sum = sum\r\nwindow.sum2 = sum2\r\nwindow.protoCtr = protoCtr\r\nwindow.create = create\r\nwindow.setproto = setproto\r\n","TestCases":[{"Name":"class","Code":"const ctr = window.Cls\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = new ctr(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= x.sum();\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"function constructor","Code":"const ctr = window.Fn;\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = new ctr(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= x.sum();\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"object literal","Code":"const ctr = window.obj;\r\nconst sum = window.sum;\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = ctr(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= sum(x);\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"object literal \u0026 sum.call","Code":"const ctr = window.obj;\r\nconst sum = window.sum2;\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = ctr(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= sum.call(x);\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"__proto__","Code":"const ctr = window.protoCtr\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = ctr(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= x.sum();\r\n}\r\nreturn y;","IsDeferred":false},{"Name":" Object.create","Code":"const ctr = window.create\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = ctr(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= x.sum();\r\n}\r\nreturn y;","IsDeferred":false},{"Name":"Object.setPrototypeOf","Code":"const ctr = window.setproto\r\nlet i = 1000;\r\nlet y = 0;\r\nwhile (i--) {\r\n let x = ctr(1, 2, 3);\r\n y \u002B= x.foo \u002B x.bar \u002B x.baz;\r\n y \u002B= x.sum();\r\n}\r\nreturn y;","IsDeferred":false}]}