.NET Intrinsics in CoreCLR 3.0
summary
Demonstrates how .NET Core 3.0 CPU intrinsics rewrite the quicksort partition into an 8‑way branchless block using Vector256 loads/stores, compare, movemask/popcnt/permute and a 256‑entry permutation table; inner loop uses unsafe pointers, 64 bytes of stack slack, and no branches per vectorized chunk. Benchmarks show roughly 2.7× speed at 1M ints versus Array.Sort (C++ implementation) as a working proof of concept, with further improvements still possible.
AI-written summary · about
chapters (7)
- 0:00Introduction and context
- 1:54CPU branch predictability
- 6:01Introduction to intrinsics
- 9:05Quicksort algorithm overview
- 18:31Vectorized instruction set
- 28:55Vectorized partition design
- 37:26Implementation and results
related talks
01h 02mSqueezing the Hardware to Make Performance Juice
24mAdvanced SIMD Algorithms in Pictures
01h 00m“Want fast C++? Know your hardware!"
01h 02mFastware
47mUnlocking Performance Improvements in .NET
59mCounting Nanoseconds Microbenchmarking C++ Code
59mPerformance matters - new tricks for old dogs
42mEfficient GPU Implementation of Affine Index Permutations on Arrays
