Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36
Chrome 83
Mac OS X 10.15.5
Desktop
4 years ago
Test name Executions per second
Array.prototype.filter 817730.5 Ops/sec
for loop & Array.prototype.push 454129.9 Ops/sec
_.filter with function 698095.2 Ops/sec
_.filter with array predicate 1130383.9 Ops/sec
_.filter with object predicate 1058550.6 Ops/sec
_.remove with function 545536.1 Ops/sec
_.remove with array predicate 1063043.1 Ops/sec
_.remove with object predicate 1103793.1 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


;