SHOGUN VS fluxsort

Compare SHOGUN vs fluxsort and see what are their differences.

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
SHOGUN fluxsort
1 12
3,005 661
0.5% -
4.8 6.4
4 months ago 2 months ago
C++ C
BSD 3-clause "New" or "Revised" License The Unlicense
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

SHOGUN

Posts with mentions or reviews of SHOGUN. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-04-20.
  • Changing std:sort at Google’s Scale and Beyond
    7 projects | news.ycombinator.com | 20 Apr 2022
    The function is trying to get the median, which is not defined for an empty set. With this particular implementation, there is an assert for that:

    https://github.com/shogun-toolbox/shogun/blob/9b8d85/src/sho...

    Unrelatedly, but from the same section:

    > Fixes are trivial, access the nth element only after the call being made. Be careful.

    Wouldn't the proper fix to do the nth_element for the larget element first (for those cases that don't do that already) and then adjust the end to be the begin + larger_n for the second nth_element call? Otherwise the second call will check [begin + larger_n, end) again for no reason at all.

fluxsort

Posts with mentions or reviews of fluxsort. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-10.
  • Fluxsort: A stable quicksort, now faster than Timsort for both random and ordered data
    1 project | /r/dataengineering | 11 Jul 2023
    2 projects | /r/programming | 4 Feb 2023
  • 10~17x faster than what? A performance analysis of Intel x86-SIMD-sort (AVX-512)
    12 projects | news.ycombinator.com | 10 Jun 2023
    Steps to build a fast, highly adaptive AVX-512 sorting algorithm:

    - Clone fluxsort (https://github.com/scandum/fluxsort)

    - Replace the partitioning code in flux_default_partition and flux_reverse_partition with the obvious AVX-512 version using a compare and two compress instructions

    - If you're feeling ambitious, swap out the small array sorting, or incorporate crumsort's fulcrum partition for larger arrays.

    I know why I haven't done this: my computer doesn't have AVX-512, and hardly anyone else's seems to. Maybe a couple Zen 4 owners. I'm less clear on why the tech giants are reinventing the wheel to make these sorting alrogithms that don't even handle pre-sorted data rather than working with some of the very high-quality open source stuff out there. Is adaptivity really considered that worthless?

    Fluxsort makes this particularly simple because it gets great performance out of a stable out-of-place partition. It's a bit newer; maybe the authors weren't aware of this work. But these algorithms both use (fairly difficult) in-place partitioning code; why not slot that into the well-known pdqsort?

  • A Rust port of crumsort, up to 75% faster than pdqsort
    8 projects | /r/rust | 21 May 2023
  • GitHub - scandum/fluxsort: A branchless stable quicksort / mergesort hybrid.
    1 project | /r/tech_article | 5 Feb 2023
  • Reinforcement learned branchless sorting functions for sort3, sort4 and sort5 were landed in LLVM
    3 projects | /r/rust | 4 Feb 2023
    With the right code and code-gen https://github.com/scandum/fluxsort/issues/5 these can be excellent at exploiting wide super-scalar architectures. I use them in both ipn_stable and to a larger extent in ipn_unstable which even uses the lesser known median networks for pivot selection. That said, I've done a lot of experiments with smaller sorting networks, sort3/4/5 as used in libcxx. And I found that they only look good in synthetic micro-benchmarks. If all your program does, is sort inputs of one specific size 3/4/5 in a hot loop and does nothing else, yes they are faster than insertion sort. But as soon as your application does some non-trivial amount of other work before calling sort again, the code complexity and additional branching required to get to that sort network is not worth it anymore. Depending on your architecture, my findings suggest they only start pulling ahead beginning at sizes 8-12.
  • Changing std:sort at Google’s Scale and Beyond
    7 projects | news.ycombinator.com | 20 Apr 2022
    Any chance you could comment on fluxsort[0], another fast quicksort? It's stable and uses a buffer about the size of the original array, which sounds like it puts it in a similar category as glidesort. Benchmarks against pdqsort at the end of that README; I can verify that it's faster on random data by 30% or so, and the stable partitioning should mean it's at least as adaptive (but the current implementation uses an initial analysis pass followed by adaptive mergesort rather than optimistic insertion sort to deal with nearly-sorted data, which IMO is fragile). There's an in-place effort called crumsort along similar lines, but it's not stable.

    I've been doing a lot of work on sorting[2], in particular working to hybridize various approaches better. Very much looking forward to seeing how glidesort works.

    [0] https://github.com/scandum/fluxsort

    [1] https://github.com/scandum/crumsort

    [2] https://mlochbaum.github.io/BQN/implementation/primitive/sor...

  • I tried creating a sorting algorithm in C language.
    4 projects | /r/algorithms | 22 Aug 2021
  • Fluxsort: A stable adaptive partitioning comparison sort
    1 project | /r/u_python7test | 25 Jul 2021
  • Hacker News top posts: Jul 25, 2021
    2 projects | /r/hackerdigest | 25 Jul 2021
    Fluxsort: A stable adaptive partitioning comparison sort\ (0 comments)

What are some alternatives?

When comparing SHOGUN and fluxsort you can also consider the following projects:

mlpack - mlpack: a fast, header-only C++ machine learning library

crumsort - A branchless unstable quicksort / mergesort that is highly adaptive.

Caffe - Caffe: a fast open framework for deep learning.

pdqsort - Pattern-defeating quicksort.

mxnet - Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more

quadsort - Quadsort is a branchless stable adaptive mergesort faster than quicksort.

Dlib - A toolkit for making real world machine learning and data analysis applications in C++

awesome-algorithms - A curated list of awesome places to learn and/or practice algorithms.

vowpal_wabbit - Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learning.

awesome-theoretical-computer-science - The interdicplinary of Mathematics and Computer Science, Distinguisehed by its emphasis on mathemtical technique and rigour.

xgboost - Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Scala, C++ and more. Runs on single machine, Hadoop, Spark, Dask, Flink and DataFlow

xeus-cling - Jupyter kernel for the C++ programming language