Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4040.5 Safari/537.36
Chrome 81
Windows
Desktop
4 years ago
Test name Executions per second
Array.prototype.filter 415113.0 Ops/sec
for loop & Array.prototype.push 237053.5 Ops/sec
_.filter with function 297953.1 Ops/sec
_.filter with array predicate 494808.5 Ops/sec
_.filter with object predicate 586234.6 Ops/sec
_.remove with function 340954.2 Ops/sec
_.remove with array predicate 573418.6 Ops/sec
_.remove with object predicate 671856.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Array.prototype.filter

  • for loop & Array.prototype.push

  • _.filter with function

  • _.filter with array predicate

  • _.filter with object predicate

  • _.remove with function

  • _.remove with array predicate

  • _.remove with object predicate


;