Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.49
Chrome 90
Windows
Desktop
3 years ago
Test name Executions per second
Testing Regex, Length 1 45.3 Ops/sec
Testing Regex, Length 10 261.3 Ops/sec
Testing Regex, Length 100 702.6 Ops/sec
Testing Regex, Length 9 kB 830.6 Ops/sec
Testing Slice, Length 1 16.7 Ops/sec
Testing Slice, Length 10 153.1 Ops/sec
Testing Slice, Length 100 1750.3 Ops/sec
Testing Slice, Length 9 kB 156805.2 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


;