Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36
Chrome 102
Windows
Desktop
2 years ago
Test name Executions per second
Match 16062125.0 Ops/sec
Split 14865070.0 Ops/sec
For loop - access with count 2858150.5 Ops/sec
For loop - searching for a single character 172816.8 Ops/sec
element mapping and filtering with position 2246621.0 Ops/sec
deleting the character out of the string and measuring the distance in length 5605556.0 Ops/sec
based on typed arrays access with cnt 349560.8 Ops/sec
based on untyped Arrays access with cnt 365906.3 Ops/sec
Using reduce 605461.7 Ops/sec
Histogram dict 72845.0 Ops/sec
split filtering with destructor 5634831.0 Ops/sec
Sanity check for loop 604556.2 Ops/sec
Sanity check for loop with of 1738920.4 Ops/sec
For loop indexOf slicing 5107123.5 Ops/sec
For loop indexOf from position 5594127.0 Ops/sec
Script Preparation code:
Tests:
  • Match

  • Split

  • For loop - access with count

  • For loop - searching for a single character

  • element mapping and filtering with position

  • deleting the character out of the string and measuring the distance in length

  • based on typed arrays access with cnt

  • based on untyped Arrays access with cnt

  • Using reduce

  • Histogram dict

  • split filtering with destructor

  • Sanity check for loop

  • Sanity check for loop with of

  • For loop indexOf slicing

  • For loop indexOf from position


;