Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36
Chrome 69
Windows
Desktop
6 years ago
Test name Executions per second
Array.prototype.filter 1337528.6 Ops/sec
for loop & Array.prototype.push 707067.7 Ops/sec
_.filter with function 979011.6 Ops/sec
_.filter with array predicate 1922360.9 Ops/sec
_.filter with object predicate 1856110.0 Ops/sec
_.remove with function 1058933.9 Ops/sec
_.remove with array predicate 1949012.8 Ops/sec
_.remove with object predicate 2020462.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


;