HTML Preparation code:
AخA
 
1
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.fp.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)
  • Lodash FP filter-map

     
    _.pipe(
      _.filter(({ filtering }) => filtering),
      _.map(({ mapping }) => mapping)
    )(data)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

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

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Chrome 76 on Windows
View result in a separate tab
Test name Executions per second
Native filter-map 5.6 Ops/sec
Lodash FP filter-map 18.3 Ops/sec