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

     
    const f = [... new Set(array)]
  • Array from set

     
    const s = new Set(array)
    const l = Array.from(s)
  • Filter

     
    const b = array.filter((i,index) => array.indexOf(i)=== index)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Set spread
    Array from set
    Filter

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36
Chrome 99 on Windows
View result in a separate tab
Test name Executions per second
Set spread 1269.8 Ops/sec
Array from set 1316.2 Ops/sec
Filter 68.7 Ops/sec