Closed zietzm closed 5 years ago
Unfortunately, it appears that while this implementation is as space efficient as the current, it is FAR slower. Therefore closing this PR and sticking with the current implementation.
it is FAR slower
Out of curiosity what's the rough difference?
The performance I'm finding is very odd. So strange, in fact, that I was very convinced there must be some kind of bug in my code that was making the runtime so excessive. Basically, for a small number of edges, the performance is about three times as slow. This is, unfortunately, the best case scenario. For large numbers of edges, it seems that the runtime is even slower than the Python XSwap implementation. In fact, its so slow that I haven't even completed a full GiG
permutation, because I worry that it might simply continue indefinitely.
Just as an example, permuting GiG
with multiplier=0.001
, I found the following:
std::vector<bool>
: 37.36 secThis was with the most simple implementation of std::vector<bool>
I could manage. I can only imagine this may have something to do with the fact that this is not a standard container.
std::vector<bool>
could be a good way to create the hash table in a space efficient way that is also very simple to use.https://en.cppreference.com/w/cpp/container/vector_bool