Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prng-bench

Benchmarking different methods to generate 1GB of random bytes in Rust.

On an AMD Ryzen 9 6900HX

PRNG method ns / byte
rand collect u8 2.36
rand fill_bytes 0.26
SmallRng fill_bytes 0.09
Xoshiro256** fill_bytes 0.09
Xoshiro256++ fill_bytes 0.09
Xoshiro512** fill_bytes 0.10
Xoshiro512++ fill_bytes 0.11
nanorand fill_bytes 0.30
fastrand fill 0.09

On an Apple M1

PRNG method ns / byte
rand collect u8 6.63
rand fill_bytes 1.11
SmallRng fill_bytes 0.17
Xoshiro256** fill_bytes 0.16
Xoshiro256++ fill_bytes 0.14
Xoshiro512** fill_bytes 0.17
Xoshiro512++ fill_bytes 0.15
nanorand fill_bytes 0.27
fastrand fill 0.04

About

A simple benchmark of multiple PRNGs in Rust

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages