Script Preparation code:
AخA
 
var set = new Set([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])
Tests:
  • Array.from

     
    var arr = Array.from(set)
  • ... expansion

     
    var arr = [...set]
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.from
    ... expansion

    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.82 Safari/537.36
Chrome 99 on Windows
View result in a separate tab
Test name Executions per second
Array.from 3290987.2 Ops/sec
... expansion 6608827.0 Ops/sec