Skip to content

Glidesort experiments - #39

Open
Kerollmops wants to merge 2 commits into
mainfrom
glidesort-experiments
Open

Glidesort experiments#39
Kerollmops wants to merge 2 commits into
mainfrom
glidesort-experiments

Conversation

@Kerollmops

Copy link
Copy Markdown
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.

@irevoire irevoire left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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