{"ScriptPreparationCode":"function createFunctionBench() {\r\n let value = null;\r\n\r\n return function closure(val) {\r\n if (val) {\r\n value = val;\r\n }\r\n\r\n return value;\r\n };\r\n}\r\n\r\nclass ClassBench {\r\n update(val) {\r\n if (val) {\r\n this.value = val;\r\n }\r\n\r\n return this.value;\r\n }\r\n}\r\n\r\nbench = {\r\n fn: createFunctionBench(),\r\n cls: new ClassBench()\r\n};","TestCases":[{"Name":"Function approach","Code":"bench.fn(performance.now());","IsDeferred":false},{"Name":"Object approach","Code":"bench.cls.update(performance.now());","IsDeferred":false}]}