[libcxx-commits] [libcxx] 52ede49 - [libc++] Make the benchmarking data pseudo-random (#159525)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Sep 24 04:57:15 PDT 2025
Author: Nikolas Klauser
Date: 2025-09-24T13:57:12+02:00
New Revision: 52ede499921f2e27c68a8f9bf9d5d3ad72aae083
URL: https://github.com/llvm/llvm-project/commit/52ede499921f2e27c68a8f9bf9d5d3ad72aae083
DIFF: https://github.com/llvm/llvm-project/commit/52ede499921f2e27c68a8f9bf9d5d3ad72aae083.diff
LOG: [libc++] Make the benchmarking data pseudo-random (#159525)
Having truly random data makes it quite difficult to compare benchmark
results, since a significant amount of difference can simply be due to
different input data. Making the data determinisic helps a lot when
trying to figure out whether specific changes indeed improve the
performance.
Added:
Modified:
libcxx/test/benchmarks/GenerateInput.h
Removed:
################################################################################
diff --git a/libcxx/test/benchmarks/GenerateInput.h b/libcxx/test/benchmarks/GenerateInput.h
index 06387852f76a6..d07cb8857579d 100644
--- a/libcxx/test/benchmarks/GenerateInput.h
+++ b/libcxx/test/benchmarks/GenerateInput.h
@@ -25,7 +25,7 @@ static const char Letters[] = {
static const std::size_t LettersSize = sizeof(Letters);
inline std::default_random_engine& getRandomEngine() {
- static std::default_random_engine RandEngine(std::random_device{}());
+ static std::default_random_engine RandEngine(123456);
return RandEngine;
}
More information about the libcxx-commits
mailing list