Test name | Executions per second |
---|---|
Lodash | 1892810.9 Ops/sec |
Native | 7500127.5 Ops/sec |
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
var a = [{name: 'a',secondName: 'b'},{name: 'f',secondName: 'b'},{name: 'u',secondName: 'b'},{name: 'p',secondName: 'b'}]
let b = _.filter(a, (item)=>item.name === 'u')
let b = a.filter((item)=>item.name === 'u')