Skip to content

optimize rand/random#760

Open
ZERICO2005 wants to merge 3 commits intomasterfrom
opt_random
Open

optimize rand/random#760
ZERICO2005 wants to merge 3 commits intomasterfrom
opt_random

Conversation

@ZERICO2005
Copy link
Contributor

Saves 2 bytes or 2F in unsigned long random(void). Also adds autotests for random, srandom, rand, and srand. The purpose of the autotests is for catching bugs when the change in output was not intended. If we change random/rand to a different algorithm, then you just need to regenerate the tests by setting GENERATE_TESTS to 1 in the main.c file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant