Skip to content

Commit aa75fc9

Browse files
committed
lib/rand: improve __fill_random_buf()
This won't be equivalent to what we have, but I _think_ the randomness is good enough for this purpose. This improves performance by about 30% for me, tested on both aarch64 and x86-64. Signed-off-by: Jens Axboe <[email protected]>
1 parent c86418b commit aa75fc9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/rand.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,7 @@ void __fill_random_buf(void *buf, unsigned int len, uint64_t seed)
103103

104104
for (; b != e; ++b) {
105105
*b = seed;
106-
seed *= GOLDEN_RATIO_PRIME;
107-
seed >>= 3;
106+
seed *= GOLDEN_RATIO_64;
108107
}
109108

110109
if (fio_unlikely(rest))

0 commit comments

Comments
 (0)