Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:108.0) Gecko/20100101 Firefox/108.0
Firefox 108
Mac OS X 10.14
Desktop
one year ago
Test name Executions per second
new RegExp() 4761017.0 Ops/sec
RegExp() factory 4784643.5 Ops/sec
Literal 9617283.0 Ops/sec
Literal premade 9878258.0 Ops/sec
Script Preparation code:
Tests:
  • new RegExp()

  • RegExp() factory

  • Literal

  • Literal premade