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

make it so random.choice is not faster for sampling from a list than sq.discrete #15

Open
peterhurford opened this issue Jun 10, 2023 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@peterhurford
Copy link
Collaborator

No description provided.

@peterhurford peterhurford added the enhancement New feature or request label Jun 10, 2023
@peterhurford peterhurford added this to the v0.27 milestone Jun 10, 2023
@agucova
Copy link
Contributor

agucova commented Jun 14, 2023

This is quite hard to beat:

image

Where _randbelow is defined as:

image

From here.

@agucova
Copy link
Contributor

agucova commented Jun 14, 2023

Oh, I see what you mean:

image

@peterhurford
Copy link
Collaborator Author

Ok I agree I don't need it to be literally as fast as random.choice as that seems unrealistic but I do think it should be possible to get it much closer. Could even consider using random.choice directly if we got the seed working right.

@peterhurford peterhurford modified the milestones: v0.27, v0.28 Oct 22, 2023
@peterhurford peterhurford modified the milestones: v0.28, v0.29 Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants