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

SAT: Optimize rebalancing algorithm #18

Open
fxamacker opened this issue Jul 4, 2021 · 0 comments
Open

SAT: Optimize rebalancing algorithm #18

fxamacker opened this issue Jul 4, 2021 · 0 comments
Assignees

Comments

@fxamacker
Copy link
Member

The rebalancing algorithm can be optimized for speed and to reduce number of slabs accessed/loaded.

  • Check right sibling first (instead of left sibling) to see if it has enough data to lend
  • Check left sibling only if (instead of always) the right sibling doesn't have enough data to lend. The benefit from borrowing from the larger sibling was maybe not worth the extra effort of accessing 2 slabs.
  • Move data within the right sibling's underlying array after it lends so it has capacity for future ops
@fxamacker fxamacker changed the title Optimize rebalancing algorithm SAT: Optimize rebalancing algorithm Jul 16, 2021
@fxamacker fxamacker self-assigned this Sep 24, 2021
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