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(10000).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()
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Native filter-map
    Lazy Lodash filter-map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:71.0) Gecko/20100101 Firefox/71.0
Firefox 71 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
Native filter-map 7882.0 Ops/sec
Lazy Lodash filter-map 5219.2 Ops/sec