HTML Preparation code:
AخA
 
1
<script>https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.core.js</script>
Script Preparation code:
 
var data = [{a: 1}, {a: 2}, {a: 3}, {a: 4}, {a: 5}, {a: 6}, {a: 7}, {a: 8}, {a: 1}];
Tests:
  • js

     
    data.filter((v, i, a) => a.findIndex(t => t.a === v.a) === i)
  • lodash

     
    _.uniqBy(data, 'a');
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    js
    lodash

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Linux; Android 10; SM-A750GN) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Mobile Safari/537.36
Chrome Mobile 94 on Android
View result in a separate tab
Test name Executions per second
js 1625066.5 Ops/sec
lodash 447325.1 Ops/sec