mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-08 03:33:32 +01:00
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:
@@ -26,6 +26,5 @@ FUZZ_TARGET(random)
|
||||
(void)fast_random_context();
|
||||
|
||||
std::vector<int64_t> integrals = ConsumeRandomLengthIntegralVector<int64_t>(fuzzed_data_provider);
|
||||
Shuffle(integrals.begin(), integrals.end(), fast_random_context);
|
||||
std::shuffle(integrals.begin(), integrals.end(), fast_random_context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user