{"ScriptPreparationCode":" const statusMap = new Map([\r\n [0, \u0027zero\u0027],\r\n [1, \u0027one\u0027],\r\n [2, \u0027two\u0027],\r\n [3, \u0027three\u0027],\r\n [4, \u0027four\u0027],\r\n ]);\r\n\r\nfunction getStatusByMap(value) {\r\n return statusMap.get(value);\r\n };\r\n\r\n function getStatusBySwitch(value) {\r\n switch (value) {\r\n case 0:\r\n return \u0027zero\u0027;\r\n case 1:\r\n return \u0027one\u0027;\r\n case 2:\r\n return \u0027two\u0027;\r\n case 3:\r\n return \u0027three\u0027;\r\n case 4:\r\n return \u0027four\u0027;\r\n default:\r\n return \u0027Undefined\u0027;\r\n }\r\n };\r\n\r\n function getStatusByIfElse(value) {\r\n if (value === 0) {\r\n return \u0027Initializing\u0027;\r\n } else if (value === 1) {\r\n return \u0027zero\u0027;\r\n } else if (value === 2) {\r\n return \u0027one\u0027;\r\n } else if (value === 3) {\r\n return \u0027two\u0027;\r\n } else if (value === 4) {\r\n return \u0027Error\u0027;\r\n }\r\n };\r\n\r\nvar i = 0; var count = 1000; var a;","TestCases":[{"Name":"map","Code":"for (i = 0; i \u003C count; i\u002B\u002B) {\r\n getStatusByMap(i % 5)\r\n}","IsDeferred":false},{"Name":"if/else","Code":"for (i = 0; i \u003C count; i\u002B\u002B) {\r\n getStatusByIfElse(i % 5)\r\n}","IsDeferred":false},{"Name":"swticth","Code":"for (i = 0; i \u003C count; i\u002B\u002B) {\r\n getStatusBySwitch(i % 5)\r\n}","IsDeferred":false}]}