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

support struct sort #2

Open
hawkingrei opened this issue Apr 26, 2022 · 2 comments
Open

support struct sort #2

hawkingrei opened this issue Apr 26, 2022 · 2 comments

Comments

@hawkingrei
Copy link

Hello, TiDB has a plan to use pdqsort to improve sort performance. but we find that Golang will support pdqsort in the Go1.19. So we decide to use this library to achieve our goals. however, we find this library only sorts this base type and we need to sort the slice of custom type. Have you a plan to improve it?

@zhangyunhao116
Copy link
Owner

Happy to see TiDB plan to use the new implementation!
The generic version of pdqsort is located in https://github.com/golang/exp/tree/master/slices for now, and it will be moved to the std in the future. The problem is that the APIs in the slices may be changed at any time. A possible solution is to copy the related code into the TiDB project, once the slices is merged into std, we can easily change the code.
For this repo, I'm still not sure whether it needs to be maintained, since it has already been merged into the Go runtime.

@hawkingrei
Copy link
Author

hawkingrei commented May 6, 2022

Thank you for your suggestion. I have started to use https://github.com/golang/exp/tree/master/slices to implement it.

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

2 participants