Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove different random functions #9

Open
RazerM opened this issue Aug 16, 2015 · 0 comments
Open

Remove different random functions #9

RazerM opened this issue Aug 16, 2015 · 0 comments

Comments

@RazerM
Copy link
Contributor

RazerM commented Aug 16, 2015

I know that the different functions are not currently used, but the recommendation I see (which links to this page) is simply to use os.urandom.

I also ran a benchmark and it seems like there is no reason for the barely_ or not_ functions to exist. This is on OS X, which doesn't distinguish between urandom and random, so the poor performance in really_ is wasted.

 benchmark 'Random': 4 tests, min 5 rounds (of min 25.00us), 1.00s max time, timer: time.time 
Name (time in us)             Min         Max       Mean     StdDev  Rounds  Iterations
---------------------------------------------------------------------------------------
test_not_random          123.9777    612.0205   166.2388    52.2006    3831           1
test_barely_random       600.8148   9958.0288   908.9467   510.4290    1447           1
test_sort_of_random       32.9018   1744.0319    48.5657    30.0384   12193           2
test_really_random      4308.9390  12615.9191  5938.7964  1233.9394     153           1
---------------------------------------------------------------------------------------
RazerM added a commit to RazerM/onepasswordpy that referenced this issue Aug 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant