Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    $\begingroup$ As you mentioned in a comment to the answer, performance is very important for you in this question. Please consider adding that to the original question! Obviously, if you need performance, the answers will end up being very different. In addition, if performance is what you require, but the answer doesn't give the performance you require, it's worth not accepting the answer. Questions with accepted answers tend not to get very many new answers. $\endgroup$ Commented Feb 4, 2020 at 0:28
  • $\begingroup$ @march Thanks, done. $\endgroup$ Commented Feb 4, 2020 at 14:48
  • $\begingroup$ Do you have some larger test data sets? It would be interesting to play with the timings. $\endgroup$ Commented Feb 5, 2020 at 4:47
  • $\begingroup$ @MikeY you can use RandomInteger[{0, 10}, {2, numberOfSamples}] and change the number of samples to whatever you like :) $\endgroup$ Commented Feb 5, 2020 at 8:37