Test name | Executions per second |
---|---|
Native filter | 21.1 Ops/sec |
Lodash filter | 28.3 Ops/sec |
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
var data = Array(1000000).fill({ filtering: true, mapping: 42 });
data.filter(({ filtering }) => filtering)
_.filter(data, 'filtering')