{"ScriptPreparationCode":"var str = \u0022123 \u0022.repeat(1000000)","TestCases":[{"Name":"split","Code":"var split = str.split(\u0022 \u0022)\r\nvar count = 0;\r\nfor (const s of split)\r\n count\u002B\u002B;","IsDeferred":false},{"Name":"indexOf","Code":"var count = 0;\r\nvar i = 0;\r\nwhile (i \u003E= 0) {\r\n count\u002B\u002B;\r\n i = str.indexOf(\u0022 \u0022, i \u002B 1);\r\n}","IsDeferred":false},{"Name":"yield","Code":"function* splitIter(str, needle) {\r\n let i = 0;\r\n while (i \u003E= 0) {\r\n const iOld = i;\r\n i = str.indexOf(needle, i \u002B 1);\r\n if (i \u003E 0)\r\n yield str.substring(iOld, i)\r\n else if (iOld \u003C str.length)\r\n yield str.substring(iOld)\r\n }\r\n}\r\n\r\nlet count = 0\r\nfor (const s of splitIter(str, \u0022 \u0022))\r\n count\u002B\u002B;","IsDeferred":false}]}