Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Windows
Desktop
one year ago
Test name Executions per second
Filter arr10 10686044.0 Ops/sec
Filter set10 12596022.0 Ops/sec
Filter arr1000 823618.8 Ops/sec
Filter set1000 12458882.0 Ops/sec
Filter arr1000000 108.0 Ops/sec
Filter set1000000 12322859.0 Ops/sec
Script Preparation code:
Tests:
  • Filter arr10

  • Filter set10

  • Filter arr1000

  • Filter set1000

  • Filter arr1000000

  • Filter set1000000