Skip to content

optimized uniform small integers? #124

Open
@nbecker

Description

@nbecker

I've been using my own wrapper to generate uniform random integers of small specific bit widths. The idea is to cache the output of a block of random_uintegers and then demux into a stream of small width values. For example, you might have a stream of 1-bit (0/1) values. The output array is any integer dtype.

I just did some benchmarking comparing my approach for 1-bit values compared to random_int, and see a quite large speedup.

Maybe something similar could be useful for randomstate?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions