how do I generate one million Gaussian unit normals fast?
more generic versions of this question were asked a few times before, e.g., as in Generate random numbers following a normal distribution in C/C++ . yes, I know about Box-Muller and adding and other techniques. I am tempted to build my inverse normal distribution, sample (i.e., map) exactly according to expectations (pseudo-normals, then), and then randomly rearrange sort order.
but, I also know I am using an Intel Core processor with recent AVX vector instruction sets, and I want to use C (not C++ with its std library) on linux or OSX with gcc. So, is there a better way to generate so many random numbers fast? for such large numbers of random number generators, does AVX even offer useful instructions? is AVX even an option worth looking into, and if so, is there an existing standard function implementation of rnorm?
Aucun commentaire:
Enregistrer un commentaire