Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36
Chrome 70
Windows
Desktop
5 years ago
Test name Executions per second
Array.prototype.filter 624755.1 Ops/sec
for loop & Array.prototype.push 377683.7 Ops/sec
_.filter with function 448596.2 Ops/sec
_.filter with array predicate 565704.5 Ops/sec
_.filter with object predicate 663694.7 Ops/sec
_.remove with function 486536.4 Ops/sec
_.remove with array predicate 666352.1 Ops/sec
_.remove with object predicate 791045.9 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


;