Run details:
Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4) Build/MPJ24.139-23.4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.98 Mobile Safari/537.36
Chrome Mobile 52
Android 6.0.1
Moto G
8 years ago
Test name Executions per second
parseHex1 113.0 Ops/sec
parseHex2 28.0 Ops/sec
parseHex3 53.1 Ops/sec
parseHex4 47.5 Ops/sec
parseHex5 329.4 Ops/sec
Script Preparation code:
Tests:
  • original

  • ES5 replace match map

  • match without replace

  • iteration with replace

  • looping with exec

  • non regex