Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Chrome 52
Windows
Other
8 years ago
Test name Executions per second
original 136.5 Ops/sec
ES5 replace match map 40.5 Ops/sec
match without replace 62.5 Ops/sec
iteration with replace 26.2 Ops/sec
looping with exec 60.8 Ops/sec
non regex 341.2 Ops/sec
Script Preparation code:
Tests:
  • original

  • ES5 replace match map

  • match without replace

  • iteration with replace

  • looping with exec

  • non regex


;