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() 740.4 Ops/sec
Lodash _.filter() 896.8 Ops/sec
.map().filter() 83.4 Ops/sec
.reduce() 882.6 Ops/sec
For loop 89.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • .filter()

  • Lodash _.filter()

  • .map().filter()

  • For loop

  • .reduce()

  • .reduce() with comparisionFunction