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

Update the bundled repository #2

Closed
mzy2240 opened this issue May 10, 2023 · 6 comments
Closed

Update the bundled repository #2

mzy2240 opened this issue May 10, 2023 · 6 comments
Assignees

Comments

@mzy2240
Copy link

mzy2240 commented May 10, 2023

Mainly due to intel/x86-simd-sort#33

@mzy2240 mzy2240 changed the title Update the bundled repository to apply https://github.com/intel/x86-simd-sort/pull/33 Update the bundled repository May 10, 2023
@mosullivan93
Copy link
Owner

This is on my to-do list. I'll let you know when I get a chance to work on it

@mosullivan93 mosullivan93 self-assigned this May 11, 2023
@mzy2240
Copy link
Author

mzy2240 commented May 11, 2023

Thanks! Have you seen this: https://julialang.org/blog/2023/04/julia-1.9-highlights/#sorting_performance? Might be interesting to compare

@mosullivan93
Copy link
Owner

I have heard that v1.9 is much faster for sorting but I haven't tested my code with it yet. I'll do some quick comparisons when I have this package updated again 👍

@mosullivan93
Copy link
Owner

mosullivan93 commented Jun 6, 2023

All done. Made a couple changes:

  • If you want to override the built in sort methods (e.g. always prefer AVX512 when it's supported, which is only forward order) you need to put the AVX512Sort.@override_builtin_sort macro in the script (e.g. after you load the module).
  • Otherwise, there's also now the subtype AVX512QuickSort <: Base.Sort.Algorithm so you can use it in sort by passing (an instance of it) as the alg keyword argument (this can't be done for partialsort! though, you'll need to use pqsort! or the override).
  • Added some basic search paths for the compiled library so it can be relocated a little more easily.

I had a quick play around with v1.9, it's much faster for sorting overall. I haven't really rigorously defined a benchmark, but for my workloads (and depending on the datatype) it can still be 2-6x faster. For most of the relevant scenarios though, it's only between 1-2x faster.

@mzy2240
Copy link
Author

mzy2240 commented Oct 31, 2023

4.0 is released and it can be used as shared lib now so I am wondering if it is much easier now to create JLL for it.

@mosullivan93
Copy link
Owner

That is an interesting question, and something I'd like to explore, but unfortunately I no longer have access to a machine supporting AVX512 so it might be some time before I get a chance to revisit this. If you're actively using this code in your research and it's important to have the most up to date version supported, please let me know and we can discuss this further directly.

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