mercredi 11 novembre 2020

Optimal way to generate and call many random numbers?

I have a general question. I've got a Julia programme that needs to use a random number each time it iterates through a for loop. I'm wondering is there any performance benefits to be gain if I make batches of random numbers before the loop and store them in an array calling these pre-made random numbers instead of generating them on the fly? And, if so, is there an optimum batch size?




Aucun commentaire:

Enregistrer un commentaire