4 ms·
> Let's say I basically want to generate a series of random numbers billions of times. That's a bit vague, if you only need pseudo random numbers consider a xo
by c0balt 3y ago
> Let's say I basically want to generate a series of random numbers billions of times.
That's a bit vague, if you only need pseudo random numbers consider a xorshift based approach, e.g., https://pkg.go.dev/github.com/db47h/rand64/xorshift https://pkg.go.dev/github.com/db47h/rand64/xorshift. Xorshift is fast and simple.
> Would Go be a good choice for this? I keep trying to learn Rust, but it's very difficult for me.
If you need fast but don't want to write Rust or C(++), Go is a good choice for this. It will likely also have a good amount of examples and existing code available for most common problems.