Script Preparation code:
Tests:
  • string.indexOf(substring) !== -1;

  • string.includes(substring);

  • new RegExp(substring).test(string);

  • string.match(new RegExp(substring));

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    string.indexOf(substring) !== -1;
    string.includes(substring);
    new RegExp(substring).test(string);
    string.match(new RegExp(substring));

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:

No previous run results

This benchmark does not have any results yet. Be the first one to run it!