Skip to content

Fix duplicate keys#16

Closed
agourlay wants to merge 1 commit into
jonhoo:mainfrom
agourlay:fix-duplicate-keys
Closed

Fix duplicate keys#16
agourlay wants to merge 1 commit into
jonhoo:mainfrom
agourlay:fix-duplicate-keys

Conversation

@agourlay

@agourlay agourlay commented Jan 30, 2025

Copy link
Copy Markdown

This PR tackles the issue #15

I have already shared my analysis and findings in this comment

Adding the Ord requirement seems logical but I understand that it is a breaking change.

@jonhoo

jonhoo commented Feb 8, 2025

Copy link
Copy Markdown
Owner

Thank you! So, my main concern here is actually that we'll end up producing fewer keys than expected, and so the results will no longer accurately match the expected mix 🤔 Unfortunately, we quickly run into the birthday problem here where the more keys you want, the more likely it is to hit duplicates when sampling randomly. I don't have a great solution for this... We could maybe generate sequential keys (not random) and then shuffle them instead (at least when the number of keys needed is large)?

@agourlay

agourlay commented Jun 3, 2026

Copy link
Copy Markdown
Author

Closing due to inactivity on my side.

@agourlay agourlay closed this Jun 3, 2026
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

Successfully merging this pull request may close these issues.

2 participants