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