Comparing 32bit and 64bit performance on low end micro-controllers
Testing 32bit vs 64bit PRNGs on a 32bit ESP32-C3 I'm seeing:
32bit
| PRNG | Iterations | Output bits | Bytes per second |
|---|---|---|---|
| xoroshiro64** | 509038 | 32 | 2036152.0 |
| pcg32 | 487697 | 32 | 1950788.0 |
64bit
| PRNG | Iterations | Output bits | Bytes per second |
|---|---|---|---|
| xoshiro256+ | 487696 | 64 | 3901568.0 |
| xoshiro512++ | 441630 | 64 | 3533040.0 |
| splitmix64 | 464875 | 64 | 3719000.0 |
| pcg64 | 529955 | 64 | 4239640.0 |
| biski64 | 484715 | 64 | 3877720.0 |
Very little difference on PRNGs that use 64bit operations vs 32bit operations. Even on limited hardware like this it makes sense to use a 64bit PRNG because you get more bytes per cycle.
Tags:


