Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Chrome 115
Windows
Desktop
one year ago
Test name Executions per second
Filter arr10 9187076.0 Ops/sec
Filter set10 10263200.0 Ops/sec
Filter arr1000 718277.9 Ops/sec
Filter set1000 10180170.0 Ops/sec
Filter arr1000000 87.0 Ops/sec
Filter set1000000 10351280.0 Ops/sec
Filter arr5 8788961.0 Ops/sec
Filter set5 10051000.0 Ops/sec
Script Preparation code:
Tests:
  • Filter arr10

  • Filter set10

  • Filter arr1000

  • Filter set1000

  • Filter arr1000000

  • Filter set1000000

  • Filter arr5

  • Filter set5