My own vxsort re-implemented with "modern" C++
The article discusses a re-implementation of the VxSort algorithm in modern C++. It highlights performance benchmarks comparing the new C++ version with the original C# implementation. The results demonstrate significant improvements in sorting speed for various data sizes.
- ▪The VxSort algorithm has been ported from C# to high-performance C++.
- ▪Benchmark tests show up to 4.8x improvement in sorting speed compared to Introspective Sort for 1M int64 elements.
- ▪The implementation includes various unrolling techniques to optimize performance.
Hacker News (Newest) files mainly under programming. We currently carry 5,257 of its stories.
Opening excerpt (first ~120 words) tap to expand
vxsort-cpp What This is a port of the C# VxSort to high-perf C++. Building mkdir build-release cd build-release # For better code-gen export CC=clang export CXX=clang++ cmake .. make -j 4 Testing ./test/vxsort_test Benchmarking Plug in to a power-source if on laptop Try to kill CPU hogs -or- Alternatively, rely on the supplied run.sh to kill -STOP / -CONT well known CPU hogs # This script will kill -STOP a bunch of CPU hogs like chrome, # Then executes # ./bench/vxsort_bench --benchmark_counters_tabular # and resume them after it's done ./bench/run.sh Results (Ryzen 3950X, 3.8Ghz) int64 Compared to Introspective Sort, we can hit: For 1M int64 elements, roughly 4.8x improvement with 8x unroll (55ns per element -> 11.5ns) For 128K int64 elements, roughly 4.5x improvement with 8x unroll…
Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.