Script Preparation code:
AخA
 
var array = Array.from({ length: 60 }, () => Math.floor(Math.random() * 140));
Tests:
  • Filter

     
    const filterF = array.filter((a, b) => array.indexOf(a) === b)
  • Set

     
    const filterS = [...new Set(array)]
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Filter
    Set

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36 OPR/90.0.4480.100
Opera 90 on Windows
View result in a separate tab
Test name Executions per second
Filter 262727.2 Ops/sec
Set 479840.4 Ops/sec