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

Speed-up the Sorter #40

Open
Kerollmops opened this issue Feb 15, 2023 · 0 comments
Open

Speed-up the Sorter #40

Kerollmops opened this issue Feb 15, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Kerollmops
Copy link
Member

Kerollmops commented Feb 15, 2023

The Sorter is doing a lot of operations to ensure the values are merged in the correct order.

I thought about a simple way to speed the sort operation a little bit: store the first byte(s) of the key in the pointer of the EntryBound itself, this way we will reduce the data fetching from the other side of the in-memory buffer. We could use an equivalent of the C bitfields.

We can then conditionally fetch the key at the other side of the buffer only if both first bytes of the two compared keys are equal. We will need to use the <[EntryBound]>::sort_by variant and no more the <EntryBound>::sort_by_key one.

@Kerollmops Kerollmops added the enhancement New feature or request label Feb 16, 2023
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

1 participant