Skip to content

Commit 81b564a

Browse files
philnik777mahesh-attarde
authored andcommitted
[libc++] Make the benchmarking data pseudo-random (llvm#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.
1 parent 551c4a1 commit 81b564a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/test/benchmarks/GenerateInput.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static const char Letters[] = {
2525
static const std::size_t LettersSize = sizeof(Letters);
2626

2727
inline std::default_random_engine& getRandomEngine() {
28-
static std::default_random_engine RandEngine(std::random_device{}());
28+
static std::default_random_engine RandEngine(123456);
2929
return RandEngine;
3030
}
3131

0 commit comments

Comments
 (0)