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

  • Literal