Test name | Executions per second |
---|---|
RegExp#test | 16351504.0 Ops/sec |
String#indexOf | 505197664.0 Ops/sec |
String#match | 10110867.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/);