Test name | Executions per second |
---|---|
String.includes | 15792320.0 Ops/sec |
Multiple String.endsWith | 6630187.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!");