Proceedings of ISP RAS

Applying AVX512 vectorization to improve the performance of a random number generator

M.S. Guskova (SC, Chernogolovka, Russia; HSE, Moscow, Russia)
L.Yu. Barash (SC, Chernogolovka, Russia; HSE, Moscow, Russia; ITP, Chernogolovka, Russia)
L.N. Shchur (SC, Chernogolovka, Russia; HSE, Moscow, Russia; ITP, Chernogolovka, Russia; CC RAS, Moscow, Russia)


The generation of uniformly distributed random numbers is necessary for computer simulation by Monte Carlo methods and molecular dynamics. Generators of pseudo-random numbers (GPRS) are used to generate random numbers. GPRS uses deterministic algorithms to calculate numbers, but the sequence obtained in this way has the properties of a random sequence. For a number of problems using Monte Carlo methods, random number generation takes up a significant amount of computational time, and increasing the generation capacity is an important task. This paper describes applying SIMD instructions (Single Instruction Multiple Data) to parallelize generation of pseudorandom numbers. We review SIMD instruction set extensions such as MMX, SSE, AVX2, AVX512. The example of AVX512 implementation is given for the LFSR113 pseudorandom number generator. Performance is compared for different algorithm implementations.


Pseudo random numbers; SIMD; AVX512 technology


Proceedings of the Institute for System Programming, vol. 30, issue 1, 2018, pp. 115-126.

ISSN 2220-6426 (Online), ISSN 2079-8156 (Print).

DOI: 10.15514/ISPRAS-2018-30(1)-8

Full text of the paper in pdf (in Russian) Back to the contents of the volume