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

     
    const f = new Set(array)
  • 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
    Filter

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Chrome 133 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Set spread 2604980.5 Ops/sec
Filter 2210875.5 Ops/sec