sort-research-rs
fancy-memcmp
sort-research-rs | fancy-memcmp | |
---|---|---|
47 | 2 | |
291 | 3 | |
- | - | |
9.0 | 3.5 | |
24 days ago | 25 days ago | |
Rust | Assembly | |
Apache License 2.0 | - |
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.
sort-research-rs
-
The Rust Calling Convention We Deserve
If you want a particularity cursed example, I've recently called Go code from Rust via C in the middle, including passing a Rust closure with state into the Go code as callback into a Go stdlib function, including panic unwinding from inside the Rust closure https://github.com/Voultapher/sort-research-rs/commit/df6c91....
- Driftsort: An efficient, generic and robust stable sort implementation
-
Out-of-bounds read and write in the glibc's qsort()
See also https://github.com/Voultapher/sort-research-rs/blob/main/wri.... Discussion at https://news.ycombinator.com/item?id=37781612
- Fast, small, robust: pick three. Introducing a novel branchless partition impl
- A performance analysis of Intel's x86-simd-sort
- sort-research-rs/writeup/intel_avx512/text.md at main · Voultapher/sort-research-rs
- Fast, small, robust: pick three. Introducing a novel branchless partition implementation.
-
Branchless Lomuto Partitioning
There was a recent post by Voultapher from the sort-research-rs project on Branchless Lomuto Partitioning
https://github.com/Voultapher/sort-research-rs/blob/main/wri...
Discussion here:
https://news.ycombinator.com/item?id=38528452
This post by orlp (creator of Pattern-defeating Quicksort and Glidesort) was linked to in the above post, and I found both to be interesting.
- A novel branchless partition implementation
- Fast, small, robust: Introducing a novel branchless partition implementation
fancy-memcmp
-
Out-of-bounds read and write in the glibc's qsort()
Hrm—that's another case of missing isel from gcc/clang (c.f. <https://pp.ipd.kit.edu/firm/selgen>)—my implementation (<https://github.com/moon-chilled/fancy-memcmp/blob/master/mem...>) does it in one less instruction. (An alternative is to skip the xors and do cmp/setcc/setcc/sub/movsx, which matches my approach on instruction count, but relies on good handling of partial renames, which is uarch-dependent. And I can never remember if anybody can eliminate movsx. Otoh it is non-destructive.)
-
LLVM's Libc Gets Much Faster memcpy For RISC-V
I only have experience with their amd64 code.
> What problems do they have?
Nothing in particular, just not particularly amazing performance. They work fine. One thing they have going for them is that they typically have separate versions for every interesting architecture feature level/set, whereas e.g. bionic only has sse code. I guess I can point at my own implementations of memset and memcmp (https://github.com/moon-chilled/fancy-memset https://github.com/moon-chilled/fancy-memcmp), both of which employ novel techniques not used by glibc; but I've not yet gotten around to doing proper benchmarks on either.
What are some alternatives?
tock - A secure embedded operating system for microcontrollers
fancy-memset - small, fast memset based on microsoft's design
ruduino - Reusable components for the Arduino Uno.
safeclib - safec libc extension with all C11 Annex K functions
fluxsort - A fast branchless stable quicksort / mergesort hybrid that is highly adaptive.
glidesort - A Rust implementation of Glidesort, my stable adaptive quicksort/mergesort hybrid sorting algorithm.
quadsort - Quadsort is a branchless stable adaptive mergesort faster than quicksort.
rotate - A collection of array rotation algorithms.
x86-simd-sort - C++ template library for high performance SIMD based sorting algorithms
book - The Rust on ESP Book
forma - An efficient vector-graphics renderer
mountain-sort - The best algorithm to sort mountains