{"ScriptPreparationCode":"window.matchStartRegex = /^test/;\r\nwindow.matchRegex = /test/;\r\nwindow.matchSubstr = \u0027test\u0027;\r\nvar data = window.data = [];\r\nconst possible = \u0022ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\u0022;\r\nvar TOTAL_STRINGS = window.TOTAL_STRINGS = 100000;\r\n\r\nfunction getRandomInt(max) {\r\n return Math.floor(Math.random() * max);\r\n}\r\n\r\nfunction makeRandomString(len) {\r\n var text = \u0022\u0022;\r\n for( var i=0; i \u003C len; i\u002B\u002B ) {\r\n text \u002B= possible.charAt(getRandomInt(possible.length));\r\n }\r\n return text;\r\n}\r\n\r\nwhile (data.length \u003C TOTAL_STRINGS) {\r\n data.push(makeRandomString(getRandomInt(20)));\r\n}","TestCases":[{"Name":"^test Regex","Code":"var x = 0;\r\nvar TOTAL_STRINGS = window.TOTAL_STRINGS;\r\nvar data = window.data;\r\nvar regex = window.matchStartRegex;\r\nlet result = false;\r\nwhile (x \u003C TOTAL_STRINGS) {\r\n const str = data[x];\r\n result = regex.test(str);\r\n x \u002B= 1;\r\n}","IsDeferred":false},{"Name":".startsWith","Code":"var x = 0;\r\nvar TOTAL_STRINGS = window.TOTAL_STRINGS;\r\nvar data = window.data;\r\nvar match = window.matchSubstr;\r\nlet result = false;\r\nwhile (x \u003C TOTAL_STRINGS) {\r\n const str = data[x];\r\n result = str.startsWith(match);\r\n x \u002B= 1;\r\n}","IsDeferred":false},{"Name":".search(RegExp)","Code":"var x = 0;\r\nvar TOTAL_STRINGS = window.TOTAL_STRINGS;\r\nvar data = window.data;\r\nvar regex = window.matchRegex;\r\nlet result = false;\r\nwhile (x \u003C TOTAL_STRINGS) {\r\n const str = data[x];\r\n result = str.search(regex);\r\n x \u002B= 1;\r\n}","IsDeferred":false},{"Name":".indexOf","Code":"var x = 0;\r\nvar TOTAL_STRINGS = window.TOTAL_STRINGS;\r\nvar data = window.data;\r\nvar match = window.matchSubstr;\r\nlet result = -1;\r\nwhile (x \u003C TOTAL_STRINGS) {\r\n const str = data[x];\r\n result = str.indexOf(match);\r\n x \u002B= 1;\r\n}","IsDeferred":false},{"Name":"RegExp # test","Code":"var x = 0;\r\nvar TOTAL_STRINGS = window.TOTAL_STRINGS;\r\nvar data = window.data;\r\nvar regex = window.matchRegex;\r\nlet result = false;\r\nwhile (x \u003C TOTAL_STRINGS) {\r\n const str = data[x];\r\n result = regex.test(str);\r\n x \u002B= 1;\r\n}","IsDeferred":false},{"Name":".includes","Code":"var x = 0;\r\nvar TOTAL_STRINGS = window.TOTAL_STRINGS;\r\nvar data = window.data;\r\nvar match = window.matchSubstr;\r\nlet result = false;\r\nwhile (x \u003C TOTAL_STRINGS) {\r\n const str = data[x];\r\n result = str.includes(match);\r\n x \u002B= 1;\r\n}","IsDeferred":false}]}