Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Windows
Desktop
one year ago
Test name Executions per second
Filter 10 4546297.0 Ops/sec
Filter 100 88724.8 Ops/sec
Filter 1000 254.1 Ops/sec
Filter 10000 2.7 Ops/sec
FindIndex + Splice 10 9992292.0 Ops/sec
FindIndex + Splice 100 5037217.0 Ops/sec
FindIndex + Splice 1000 835766.9 Ops/sec
FindIndex + Splice 10000 53878.2 Ops/sec
Script Preparation code:
Tests:
  • Filter 10

  • Filter 100

  • Filter 1000

  • Filter 10000

  • FindIndex + Splice 10

  • FindIndex + Splice 100

  • FindIndex + Splice 1000

  • FindIndex + Splice 10000