Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
.filter() 713.7 Ops/sec
Lodash _.filter() 878.2 Ops/sec
.map().filter() 81.8 Ops/sec
.reduce() 852.9 Ops/sec
For loop 87.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • .filter()

  • Lodash _.filter()

  • .map().filter()

  • For loop

  • .reduce()

  • .reduce() with comparisionFunction