Razaekel / noise-rs

Procedural noise generation library for Rust.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use nanorand crate over rand_xorshift?

Absolucy opened this issue · comments

commented

Hi, I'm the author of the nanorand crate

It could improve speed and compile time to use nanorand's wyrand implementation, in addition to reducing predictability (on my PC, wyrand benches at around 8 GiB/s, while xorshift benches at around 6.7 GiB/s)

Also, wyrand passes TestU01/BigCrush and practrand, and is less predictable than XorShift in general.

Right now the RNG is only used to randomly shuffle 256 u8 entries in a lookup table to do something similar to Pearson hashing but ideally a RNG or hash function would be used directly on the inputs. The reason this hasn't happened yet is that everything else has been much slower and no one could tell if there was a quality improvement or not. Unless nanorand can be used as a pseudo-hash to replace the lookup table there is no point in replacing rand, the RNG is only used during initialization.