# We love sorting -- latest news in sorting

**URL:** <https://discourse.julialang.org/t/we-love-sorting-latest-news-in-sorting/100790>\
**Category:** Performance\
**Created:** [June 24, 2023, 6:44pm UTC](https://discourse.julialang.org/t/we-love-sorting-latest-news-in-sorting/100790 "2023-06-24T18:44:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blackeneth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blackeneth/32/10353_2.png) [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Post date:** [June 24, 2023, 6:44pm UTC](https://discourse.julialang.org/t/we-love-sorting-latest-news-in-sorting/100790/1 "2023-06-24T18:44:37Z")

</div>

This post was inspired by this news article on Intel releasing version 2.0 of their SIMD sort code:

> **[Intel Releases x86-simd-sort 2.0 With Faster AVX-512 Sorting, New Algorithms](https://www.phoronix.com/news/Intel-x86-simd-sort-2.0)**
>
> Earlier this year Intel software engineers published a blazing fast AVX-512 sorting library that was initially picked up by Numpy where it netted them 10~17x faster sorts

Julia has something similar to this:

> **[GitHub - nlw0/ChipSort.jl: Sorting deeds done down the chip](https://github.com/nlw0/ChipSort.jl)**
>
> Sorting deeds done down the chip. Contribute to nlw0/ChipSort.jl development by creating an account on GitHub.

which was presented at the 2019 JuliaCon. ChipSort, however, isn’t limited to just AVX512.

While sorting is one of oldest and most studied problems in computer science. SIMD sorting algorithms appear to be the “hot new thing” right now, even though a quick search finds research on these algorithms from 1985 ([Parallel Sorting Algorithms by Selim G. Akl](https://shop.elsevier.com/books/parallel-sorting-algorithms/akl/978-0-12-047680-0)) yet research still continues. Some research code in Julia are below:

> **[GitHub - xiaodaigh/SortingLab.jl: Faster sorting algorithms (sort and...](https://github.com/xiaodaigh/SortingLab.jl)**
>
> Faster sorting algorithms (sort and sortperm) for Julia - GitHub - xiaodaigh/SortingLab.jl: Faster sorting algorithms (sort and sortperm) for Julia

> **[GitHub - JeffreySarnoff/SortingNetworks.jl: Sort 1..25 values with...](https://github.com/JeffreySarnoff/SortingNetworks.jl)**
>
> Sort 1..25 values with conditional swaps. Contribute to JeffreySarnoff/SortingNetworks.jl development by creating an account on GitHub.

Often different algorithms are used for the different kinds of data to be sorted (partially sorted already, unicode strings, sorting records, etc.).

> **[GitHub - JuliaCollections/SortingAlgorithms.jl: extra sorting algorithms...](https://github.com/JuliaCollections/SortingAlgorithms.jl)**
>
> extra sorting algorithms extending Julia's sorting API - GitHub - JuliaCollections/SortingAlgorithms.jl: extra sorting algorithms extending Julia's sorting API

Google has released a SIMD sort algorithm, vqsort:

> **[Vectorized and performance-portable Quicksort](https://opensource.googleblog.com/2022/06/Vectorized%20and%20performance%20portable%20Quicksort.html)**
>
> We're sharing open source code that can sort arrays of numbers about ten times as fast as the C++ std::sort

There is an algorithm, AA-Sort (from 2007), which uses both SIMD and thread-level parallelism, but I haven’t seen a Julia implementation of it:

[AA-Sort: A New Parallel Sorting Algorithm for Multi-Core SIMD Processors](https://dl.acm.org/doi/pdf/10.5555/1299042.1299047)

Here is a link to a [C++ implementation of it](https://github.com/Const-me/fTetWild/tree/master/MeshRepair/TetWild2/Utils/AASort).

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [December 3, 2024, 5:16pm UTC](https://discourse.julialang.org/t/we-love-sorting-latest-news-in-sorting/100790/2 "2024-12-03T17:16:38Z")

</div>

A post was split to a new topic: [Numpy.sort vs Julia sort](https://discourse.julialang.org/t/numpy-sort-vs-julia-sort/123421)
