Benchmark diff implementations
In #16 @bali182 discussed the various options for removing an element from an array by index. Would be nice to benchmark the different available approaches.
@sdgluck any idea how we should go about this? I don't think this should live in this repo, but it would be nice to have this (among other things) tested in both various browsers and node. I tried jsPerf, but it's a mess, I couldn't even submit it, the server died on me before the tests were saved, after that the site wouldn't even load... Do you know of any tools that does this well? Google did not come up with much - at least not the first page :)
We could use https://benchmarkjs.com/ but that is something we have to run on our own possibly using travis together with the tests :(
I think having the benchmarks in the repository would be fine, under a benchmarks folder? That way they can be run through an npm script.
Benchmarks could be created using marky
Sure, if you are OK with having in the repo :)
But regarding the tool for benchmarking, I don't think we should use a single run with a timer, that can be very circumstantial. I think we should use a benchmarking tool that runs each case a good number of times and draws the conclusion from that.
That's why I was looking at benchmark this seems to be the only benchmarking tool I could find for js, but not really sure how good or bad it is. I'll keep looking.
Managed to get jsPerf workinging: https://jsperf.com/remove-by-index-from-array
Results (quite suprising - at least for me) - slicing then concatenating seems to be the fastest on all platforms and browsers.
Windows/Chrome:

Windows/Firefox

Mac/Chrome

Mac/Firefox

Interesting results! Especially that Chrome seems to be significantly slower than Firefox in this regard.
Remember, that most ES6+ features aren't yet optimized to their ES5 counterparts. Even introducing Babel to the mix can skew the results.
https://kpdecker.github.io/six-speed/#test-spread