Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
Firefox 136
Windows
Desktop
one month ago
Test name Executions per second
.endsWith 798909824.0 Ops/sec
.includes 760425920.0 Ops/sec
=== 898561152.0 Ops/sec
Script Preparation code:
x
 
var string = 'car';
var stringToCheck = 'car';
var result = null;
Tests:
  • .endsWith

     
    result = stringToCheck.endsWith(string);
  • .includes

     
    result = stringToCheck.endsWith(string);
  • ===

     
    result = stringToCheck===string;