Skip to content

minor speedup in pcg32_random_r() possible? #3

@jason-s

Description

@jason-s

return (xorshifted >> rot) | (xorshifted << ((-rot) & 31));

Wouldn't this be equivalent (and hence be slightly faster)?

return (xorshifted >> rot) | (xorshifted << (32-rot));

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