Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15
Safari 13
Mac OS X 10.15.5
Desktop
4 years ago
Test name Executions per second
Testing Regex, Length 1 60.7 Ops/sec
Testing Regex, Length 10 439.5 Ops/sec
Testing Regex, Length 100 1369.8 Ops/sec
Testing Regex, Length 9 kB 1798.0 Ops/sec
Testing Slice, Length 1 26.0 Ops/sec
Testing Slice, Length 10 202.8 Ops/sec
Testing Slice, Length 100 2092.9 Ops/sec
Testing Slice, Length 9 kB 181335.4 Ops/sec
Testing Substr, Length 1 22.6 Ops/sec
Testing Substr, Length 10 181.2 Ops/sec
Testing Substr, Length 100 1830.6 Ops/sec
Testing Substr, Length 9 kB 162239.8 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