Test name | Executions per second |
---|---|
RegExp#test | 7204077.0 Ops/sec |
String#indexOf | 71768600.0 Ops/sec |
String#match | 5292097.5 Ops/sec |
<div>This is demo</div>
console.log("js preparation");
/o/.test('Hello World!');
'Hello World!'.indexOf('o') > -1;
!!'Hello World!'.match(/o/);