Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Chrome 58
Windows
Other
7 years ago
Test name Executions per second
Array.prototype.filter 377392.8 Ops/sec
for loop & Array.prototype.push 220785.5 Ops/sec
_.filter with function 445180.9 Ops/sec
_.filter with array predicate 755200.9 Ops/sec
_.filter with object predicate 618393.7 Ops/sec
_.remove with function 499152.2 Ops/sec
_.remove with array predicate 763973.7 Ops/sec
_.remove with object predicate 666020.7 Ops/sec
Array.prototype.forEach & Array.prototype.push 449899.2 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

  • Array.prototype.forEach & Array.prototype.push


;