Run details:
Mozilla/5.0 (Windows NT 6.1; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4080.0 Safari/537.36 Edg/82.0.453.2
Chrome 82
Windows 7
Desktop
4 years ago
Test name Executions per second
new RegExp() 450897.5 Ops/sec
Literal 437659.3 Ops/sec
Script Preparation code:
Tests:
  • new RegExp()

  • Literal