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

Use usize indexes #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Use usize indexes #40

wants to merge 1 commit into from

Conversation

Ten0
Copy link
Contributor

@Ten0 Ten0 commented Mar 28, 2022

This allows for unioning bigger sets if necessary, but also doesn't necessarily change the storage size because it may still downsize to an u32 in from_index.

This shouldn't change anything to perf if the caller still uses u32 in their UnifyKey, considering that converting from usize to u32 was already done just before these function calls, and now it will be done just after, and they will likely be inlined.

The only place I can see where this may have implications is on rank, which may need to be made bigger as well... but it looks like the max rank is actually logarithmic in the number of nodes if we merge favoring min rank so it's unlikely to be necessary.

This allows for unioning bigger sets, but also doesn't change the
storage size because it may still downsize in from_index
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.

1 participant