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

Glidesort experiments #39

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Glidesort experiments #39

wants to merge 2 commits into from

Conversation

Kerollmops
Copy link
Member

This PR exposes two cargo features to enable glidesort as the sort algorithm for the grenad Sorter:

  • glidesort-stable: Use glidesort to stable sort in the Sorter instead of using the std sort algorithms.
  • glidesort-unstable: Use glidesort to unstable sort in the Sorter. Note that it will use a stable sort as glidesort doesn't support unstable sorting but is usually faster than the unstable sorting of the std.

Glidesort can also take the external buffer as a parameter which allows us to reduce the number of new allocations and speedup the Sorter again. The Sorter could allocate this buffer when created and keep it until dropped. Still, it could just take a slice of the available memory in the big buffer already allocated to store the keys and EntryBounds. It is a possible future work in this PR.

Copy link
Member

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

that’s noice 👀
Are you going to benchmark it?

@Kerollmops
Copy link
Member Author

Indeed, I will run the benchmark of milli and meilisearch and also run a real use-case of 40 million musics on a bare-metal instance just for fun 🤩

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