arr-diff
arr-diff copied to clipboard
Better `filter.js` benchmark
There are many things I would like to change:
- https://github.com/jonschlinkert/arr-diff/blob/ea84b7d68a26c29bd9c8715879f6714a0986752f/benchmark/code/filter.js#L3 Uses
function
instead of arrow function - https://github.com/jonschlinkert/arr-diff/blob/ea84b7d68a26c29bd9c8715879f6714a0986752f/benchmark/code/filter.js#L3 Uses
arrays
for a parameter, but is actually used likeconst arrays =
. Usesarguments
, when it could use...arrays
. - https://github.com/jonschlinkert/arr-diff/blob/ea84b7d68a26c29bd9c8715879f6714a0986752f/benchmark/code/filter.js#L4 This is a really wierd line. Can just use
[].concat()
instead of[].concat.apply()
. Uses[].slice
whenArray.prototype.slice
makes more sense. - https://github.com/jonschlinkert/arr-diff/blob/ea84b7d68a26c29bd9c8715879f6714a0986752f/benchmark/code/filter.js#L6 Can use
includes
instead ofindexOf
Can I make a pull request changing this? Should I add a new benchmark or edit the existing one?