Batched ranged random integer generation

Summary Pseudorandom values are often generated as 64‐bit binary words. These random words need to be converted into ranged values without statistical bias. We present an efficient algorithm to generate multiple independent uniformly‐random bounded integers from a single uniformly‐random binary word, without any bias. In the common case, our method uses one multiplication and no division operations per value produced. In practice, our algorithm can more than double the speed of unbiased random shuffling for small to moderately large arrays.

Authors

Institutions

Publication Details

Journal
Software Practice and Experience
Published
2024-08-25
DOI
https://doi.org/10.1002/spe.3369
Primary Topic
Chaos-based Image/Signal Encryption
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Batched ranged random integer generation

Daniel Lemire A, Nevin Brackett‐Rozinsky
Software Practice and Experience
Chaos-based Image/Signal Encryption
article

Batched ranged random integer generation

Daniel Lemire A, Nevin Brackett‐Rozinsky
article en

Abstract

Summary Pseudorandom values are often generated as 64‐bit binary words. These random words need to be converted into ranged values without statistical bias. We present an efficient algorithm to generate multiple independent uniformly‐random bounded integers from a single uniformly‐random binary word, without any bias. In the common case, our method uses one multiplication and no division operations per value produced. In practice, our algorithm can more than double the speed of unbiased random shuffling for small to moderately large arrays.

Software Practice and ExperienceVol. 55(1)
Université du Québec à Montréal (CA), Université TÉLUQ (CA)
Natural Sciences and Engineering Research Council of Canada
Openalex Percentile: Top 87%
Chaos-based Image/Signal Encryption
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.