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

Faster strategy for arrays(..., unique=True) #3076

Merged
merged 1 commit into from Aug 31, 2021

Conversation

Zac-HD
Copy link
Member

@Zac-HD Zac-HD commented Aug 29, 2021

Closes #3066.

Note that this doesn't change the behaviour for arrays which have a fill strategy; in those cases there's a tricky three-way tradeoff between speed, shrinking quality, and ability to assign elements to almost all indices (due to birthday paradox considerations). Since performance is a real concern for array strategies and we typically want to be sparse anyway, I've kept the existing behaviour for that branch.

@Zac-HD Zac-HD added the performance go faster! use less memory! label Aug 29, 2021
@Zac-HD Zac-HD requested a review from rsokl August 29, 2021 11:14
@Zac-HD Zac-HD force-pushed the faster-uniq-arrays branch 4 times, most recently from aa565dc to f662686 Compare August 29, 2021 14:41
@honno honno mentioned this pull request Aug 29, 2021
Copy link
Contributor

@rsokl rsokl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Not only faster, but also significantly cleaner!

@Zac-HD Zac-HD merged commit 8109b00 into HypothesisWorks:master Aug 31, 2021
@Zac-HD Zac-HD deleted the faster-uniq-arrays branch August 31, 2021 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance go faster! use less memory!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve arrays() performance with unique-sampled-list tricks
2 participants