The article "Fast Random Integer Generation in an Interval" by Lemire (2018) addressed the problem of reducing the cost of machine instructions needed for the random generation of integer values in a generic interval [0,s). The approach taken by the author is the one of exploiting the rejection method (Neumann 1951) to build an algorithm that almost eliminates the need for performing integer division operations-the algorithm still exploits divisions by powers of two, implemented in the form of cheap shift operations. In more details, the likelihood of not requiring an integer division in the proposed algorithm is 2 L -s/2 L , where L denotes the number of bits used to represent integer values. The author also presents a comparative experimental study where the new algorithm, and its implementation for x86 processors, are compared with solutions offered by common software libraries for different programming languages.
Quaglia, F. (2019). Replicated computational results (RCR) Report for "Fast random integer generation in an interval". ACM TRANSACTIONS ON MODELING AND COMPUTER SIMULATION, 29(1), 1-3 [10.1145/3239569].
Replicated computational results (RCR) Report for "Fast random integer generation in an interval"
Quaglia F.
2019-01-01
Abstract
The article "Fast Random Integer Generation in an Interval" by Lemire (2018) addressed the problem of reducing the cost of machine instructions needed for the random generation of integer values in a generic interval [0,s). The approach taken by the author is the one of exploiting the rejection method (Neumann 1951) to build an algorithm that almost eliminates the need for performing integer division operations-the algorithm still exploits divisions by powers of two, implemented in the form of cheap shift operations. In more details, the likelihood of not requiring an integer division in the proposed algorithm is 2 L -s/2 L , where L denotes the number of bits used to represent integer values. The author also presents a comparative experimental study where the new algorithm, and its implementation for x86 processors, are compared with solutions offered by common software libraries for different programming languages.I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.