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 404410.8 Ops/sec
for loop & Array.prototype.push 303301.8 Ops/sec
_.filter with function 442152.3 Ops/sec
_.filter with array predicate 719518.2 Ops/sec
_.filter with object predicate 602262.5 Ops/sec
_.remove with function 446526.4 Ops/sec
_.remove with array predicate 639063.7 Ops/sec
_.remove with object predicate 609279.5 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


;