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 428236.1 Ops/sec
for loop & Array.prototype.push 148689.8 Ops/sec
_.filter with function 321401.0 Ops/sec
_.filter with array predicate 725397.9 Ops/sec
_.filter with object predicate 608343.4 Ops/sec
_.remove with function 485192.2 Ops/sec
_.remove with array predicate 721245.2 Ops/sec
_.remove with object predicate 540408.4 Ops/sec
Array.prototype.forEach & Array.prototype.push 437530.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

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


;