-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark diff implementations #18
Comments
@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 could be created using |
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. |
Interesting results! Especially that Chrome seems to be significantly slower than Firefox in this regard. |
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.
The text was updated successfully, but these errors were encountered: