HTML Preparation code:
x
 
1
2
<script src='https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js'></script>
Tests:
  • Set

     
    var l = new Set([1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7]);
    return l;
  • Array

     
    var l = [1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7];
    return _.uniq(l);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Set
    Array

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 17 hours ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Firefox 137 on Windows
View result in a separate tab
Test name Executions per second
Set 3250077.2 Ops/sec
Array 5460852.5 Ops/sec