Run details:
Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Mobile Safari/537.36
Chrome Mobile 91
Android
Mobile
3 years ago
Test name Executions per second
new RegExp() 1240201.1 Ops/sec
RegExp() factory 1316947.6 Ops/sec
Literal 3892014.2 Ops/sec
Literal premade 2801190.2 Ops/sec
Script Preparation code:
Tests:
  • new RegExp()

  • RegExp() factory

  • Literal

  • Literal premade


;