Joseph Rushton Wakeling:

How does the speed of that code change if instead of the Random struct, you use std.random.Xorshift32 ... ?

That change of yours was well studied in the first blog post (the serial one) and the performance loss of using Xorshift32 was significant, even with LDC2. I don't know why.

Sometimes even moving things (like the Xorshift struct) in another module changes the code performance. Performance optimization is a bit of an art still. In theory such cases should be studied, and the performance loss should be understood and fixed :-)

Bye,
bearophile

Reply via email to