string compare perf test

Benchmark created 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 - small size
var data = "legacy versions of Internet Explorer."

data.search(/Explorer/i);
 
ready

Revisions

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