HTML Preparation code:
AخA
 
1
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.11/lodash.min.js"></script>
Script Preparation code:
 
var values = _.fill(Array(100000), null).map(() => _.random(0,9));
Tests:
  • lodash uniq

     
    const results = _.uniq(values);
  • Set

     
    const results = [...new Set(values)];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    lodash uniq
    Set

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 years ago)
Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0
Firefox 64 on Linux
View result in a separate tab
Test name Executions per second
lodash uniq 288.6 Ops/sec
Set 290.9 Ops/sec