{"ScriptPreparationCode":null,"TestCases":[{"Name":"Without memoizastion","Code":"const getSettingValues = config =\u003E config.values;\r\nconst showPrimaryProfile = config =\u003E {\r\n const enabledChannels = _.union(getSettingValues(config), [\u0027a\u0027]);\r\n return _.includes(enabledChannels, [\u0027b\u0027]);\r\n}\r\n\r\n_.times(1000, () =\u003E {\r\n showPrimaryProfile({values: [\u0027z\u0027]});\r\n})\r\n","IsDeferred":false},{"Name":"With Memoization","Code":"const getSettingValues = config =\u003E config.values;\r\nconst getEnabledChannels = _.memoize(config =\u003E _.union(config, [\u0027a\u0027]))\r\nconst showPrimaryProfile = config =\u003E {\r\n const enabledChannels = getEnabledChannels(getSettingValues(config));\r\n return _.includes(enabledChannels, [\u0027b\u0027]);\r\n}\r\n\r\n_.times(1000, () =\u003E {\r\n showPrimaryProfile({values: [\u0027z\u0027]});\r\n})\r\n","IsDeferred":false}]}