Run details:
Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0
Firefox 52
Windows XP
Desktop
one year ago
Test name Executions per second
new RegExp() 6116399.0 Ops/sec
Literal 6241188.0 Ops/sec
new RegExp(Literal) 912632.4 Ops/sec
Script Preparation code:
Tests:
  • new RegExp()

  • Literal

  • new RegExp(Literal)