Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36
Chrome 86
Mac OS X 10.15.7
Desktop
4 years ago
Test name Executions per second
original 867.6 Ops/sec
ES5 replace match map 324.4 Ops/sec
match without replace 578.1 Ops/sec
iteration with replace 297.5 Ops/sec
looping with exec 499.7 Ops/sec
non regex 3378.6 Ops/sec
Script Preparation code:
Tests:
  • original

  • ES5 replace match map

  • match without replace

  • iteration with replace

  • looping with exec

  • non regex


;