Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.967 YaBrowser/23.9.1.967 Yowser/2.5 Safari/537.36
Yandex Browser 23
Windows
Desktop
one year ago
Test name Executions per second
first splice object 199408.8 Ops/sec
first splice number 199779.6 Ops/sec
first filter object 115572.9 Ops/sec
first filter number 114541.6 Ops/sec
last splice object 131201.3 Ops/sec
last splice number 128457.4 Ops/sec
last filter object 114787.6 Ops/sec
last filter number 111766.1 Ops/sec
Script Preparation code:
Tests:
  • findIndex, splice

  • filter

  • indexOf, splice

  • indexOf, splice, check

  • for, splice