{"ScriptPreparationCode":null,"TestCases":[{"Name":"switch case","Code":"function thing(j)\r\n{\r\n switch(j)\r\n {\r\n case 0:\r\n case 1:\r\n case 2:\r\n case 3:\r\n return 1;\r\n \r\n case 10:\r\n case 11:\r\n case 12:\r\n case 13:\r\n return 2;\r\n \r\n case 24:\r\n case 25:\r\n case 26:\r\n case 27:\r\n return 3;\r\n \r\n default:\r\n return 0;\r\n }\r\n}\r\n\r\nlet sum = 0\r\nfor(let i = 0; i \u003C 100000; i\u002B\u002B)\r\n{\r\nfor(let j = 0; j \u003C 32; j\u002B\u002B)\r\n{\r\n \tsum \u002B= thing(j);\r\n}\r\n}\r\nconsole.log(sum);\r\n\r\n","IsDeferred":false},{"Name":"jump table","Code":"function thing(j)\r\n{\r\n if(j == 0) return 1;\r\n if(j == 1) return 1;\r\n if(j == 2) return 1;\r\n if(j == 3) return 1;\r\n \r\n if(j == 10) return 2;\r\n if(j == 11) return 2;\r\n if(j == 12) return 2;\r\n if(j == 13) return 2;\r\n \r\n if(j == 24) return 3;\r\n if(j == 25) return 3;\r\n if(j == 26) return 3;\r\n if(j == 27) return 3;\r\n \r\n return 0;\r\n}\r\n\r\nlet sum = 0\r\nfor(let i = 0; i \u003C 100000; i\u002B\u002B)\r\n{\r\nfor(let j = 0; j \u003C 32; j\u002B\u002B)\r\n{\r\n \tsum \u002B= thing(j);\r\n}\r\n}\r\nconsole.log(sum);\r\n\r\n\r\n","IsDeferred":false}]}