Test name | Executions per second |
---|---|
String.includes | 16873130.0 Ops/sec |
Multiple String.endsWith | 7340433.0 Ops/sec |
var string = "This is a moderately-sized string that ends with Hello World!";
string.includes("World");
string.endsWith("World") || string.endsWith("World!");