Run details:
Mozilla/5.0 (Android 11; Mobile; rv:89.0) Gecko/89.0 Firefox/89.0
Firefox Mobile 89
Android
Mobile
3 years ago
Test name Executions per second
new RegExp() 3343044.5 Ops/sec
RegExp() factory 3383309.8 Ops/sec
Literal 6429539.5 Ops/sec
Literal premade 6555298.5 Ops/sec
Script Preparation code:
Tests:
  • new RegExp()

  • RegExp() factory

  • Literal

  • Literal premade