Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Chrome 76
Linux
Desktop
5 years ago
Test name Executions per second
Lodash 1892810.9 Ops/sec
Native 7500127.5 Ops/sec
HTML Preparation code:
AخA
 
1
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
Script Preparation code:
 
var a = [{name: 'a',secondName: 'b'},{name: 'f',secondName: 'b'},{name: 'u',secondName: 'b'},{name: 'p',secondName: 'b'}]
Tests:
  • Lodash

     
    let b = _.filter(a, (item)=>item.name === 'u')
  • Native

     
    let b = a.filter((item)=>item.name === 'u')