{"ScriptPreparationCode":"var data = Array(200).map(_ =\u003E Math.floor(1000*Math.random()));\r\n\r\n\r\nfunction foo() {\r\n let same = 0;\r\n for (let i = 0; i \u003C data.length; i\u002B\u002B) {\r\n for (let j = 0; j \u003C data.length; j\u002B\u002B) {\r\n if (i==j) continue;\r\n\r\n const compare = () =\u003E {\r\n if (data[i] == data[j]) {\r\n same\u002B\u002B;\r\n }\r\n }\r\n\r\n compare()\r\n }\r\n }\r\n\r\n return same\r\n}\r\n\r\nfunction bar() {\r\n let same = 0;\r\n\r\n const compare = (a, b) =\u003E {\r\n return a === b\r\n }\r\n\r\n for (let i = 0; i \u003C data.length; i\u002B\u002B) {\r\n for (let j = 0; j \u003C data.length; j\u002B\u002B) {\r\n if (i==j) continue;\r\n\r\n if (compare(data[i], data[j])) {\r\n same\u002B\u002B;\r\n }\r\n }\r\n }\r\n\r\n return same\r\n}","TestCases":[{"Name":"create closure every time","Code":"foo()","IsDeferred":false},{"Name":"reuse closure","Code":"bar()","IsDeferred":false}]}