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