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