Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36
Chrome 76
Windows
Desktop
5 years ago
Test name Executions per second
Native filter-map 15.7 Ops/sec
Lazy Lodash filter-map 12.2 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 data = Array(1000000).fill({ filtering: true, mapping: 42 });
Tests:
  • Native filter-map

     
    data.filter(({ filtering }) => filtering).map(({ mapping }) => mapping)
  • Lazy Lodash filter-map

     
    _(data).filter('filtering').map('mapping').value()