Not the main point of the post, just a small comment
So if you have any good hypotheses, you might want to test them with a compiled language for a 100-fold speedup over python
This used to be a kind of common knowledge that python is 100 times slower than C++ for example—at least I heard it quite a lot in the world of competitive programming—but I think this is kind of false nowaday
Libraries like NumPy are basically compiled C code accessible to the python user; thus, using such libraries will yield comparable performance to C/C++. Since a lot of operations can be written using NumPy or similar libraries, python is in fact no longer that slow.
I don’t have yet access to the code of this challenge, so maybe this one cannot be written this way, and therefore it would genuinely be 100 times faster using another language. But, in general, many standard operations can be done in python without such a big slowdown.
I doubt you could use numpy to compute this efficiently, since (afaik) numpy only gives you a big speedup on very regular vector/matrix type computations, which this is not.
Not the main point of the post, just a small comment
This used to be a kind of common knowledge that python is 100 times slower than C++ for example—at least I heard it quite a lot in the world of competitive programming—but I think this is kind of false nowaday
Libraries like NumPy are basically compiled C code accessible to the python user; thus, using such libraries will yield comparable performance to C/C++. Since a lot of operations can be written using NumPy or similar libraries, python is in fact no longer that slow.
I don’t have yet access to the code of this challenge, so maybe this one cannot be written this way, and therefore it would genuinely be 100 times faster using another language. But, in general, many standard operations can be done in python without such a big slowdown.
I doubt you could use numpy to compute this efficiently, since (afaik) numpy only gives you a big speedup on very regular vector/matrix type computations, which this is not.