random: drop ad-hoc Shuffle in favor of std::shuffle

Benchmarks show it is no longer faster with modern standard C++ libraries,
and the debug-mode failure due to self-move has been fixed as well.
This commit is contained in:
Pieter Wuille
2024-07-05 10:45:54 -04:00
parent da28a26aae
commit 6ecda04fef
14 changed files with 19 additions and 61 deletions

View File

@@ -1625,7 +1625,7 @@ private:
}
}
if (shuffle) {
Shuffle(m_nodes_copy.begin(), m_nodes_copy.end(), FastRandomContext{});
std::shuffle(m_nodes_copy.begin(), m_nodes_copy.end(), FastRandomContext{});
}
}