Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Chrome 69
Windows 7
Desktop
6 years ago
Test name Executions per second
Testing Regex, Length 1 32.0 Ops/sec
Testing Regex, Length 10 96.4 Ops/sec
Testing Regex, Length 100 240.8 Ops/sec
Testing Regex, Length 9 kB 312.8 Ops/sec
Testing Slice, Length 1 14.4 Ops/sec
Testing Slice, Length 10 83.5 Ops/sec
Testing Slice, Length 100 1516.8 Ops/sec
Testing Slice, Length 9 kB 136477.3 Ops/sec
Testing Substr, Length 1 13.8 Ops/sec
Testing Substr, Length 10 87.2 Ops/sec
Testing Substr, Length 100 1533.0 Ops/sec
Testing Substr, Length 9 kB 137605.9 Ops/sec
Script Preparation code:
Tests:
  • Testing Regex, Length 1

  • Testing Regex, Length 10

  • Testing Regex, Length 100

  • Testing Regex, Length 9 kB

  • Testing Slice, Length 1

  • Testing Slice, Length 10

  • Testing Slice, Length 100

  • Testing Slice, Length 9 kB

  • Testing Substr, Length 1

  • Testing Substr, Length 10

  • Testing Substr, Length 100

  • Testing Substr, Length 9 kB