string compare perf test pt 2 (v2)

Revision 2 of this benchmark created by ar on


Test runner

Ready to run.

Testing in
TestOps/sec
lowercased indexof - mid size
var data = "The Modern.ie scan analyzes the HTML, CSS, and JavaScript of a site or application to determine whether it is using good development practices. It warns about practices such as browser `userAgent` sniffing, use of ActiveX, or APIs specific to legacy versions of Internet Explorer."

data.toLowerCase().indexOf('Explorer'.toLowerCase());
ready
search - mid size
var data = "The Modern.ie scan analyzes the HTML, CSS, and JavaScript of a site or application to determine whether it is using good development practices. It warns about practices such as browser `userAgent` sniffing, use of ActiveX, or APIs specific to legacy versions of Internet Explorer."

data.search(/Explorer/i);
ready
lowercased indexof - small size
var data = "legacy versions of Internet Explorer."

data.toLowerCase().indexOf('Explorer'.toLowerCase());
ready
search - large size but search term quite near at the start
var data = "versions of Internet Explorer.T he Modern.ie scan analyzes the HTML, CSS, and JavaScript of a site or application to determine whether it is using good development practices. It warns about practices such as browser `userAgent` sniffing, use of ActiveX, or APIs specific to legacy versions of The Modern.ie scan analyzes the HTML, CSS, and JavaScript of a site or application to determine whether it is using good development practices. It warns about practices such as browser `userAgent` sniffing, use of ActiveX, or APIs specific to legacy versions of "

data.search(/Explorer/i);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.