~/talk

Beating CoreCLR's own C++ code with CoreCLR 3.0 intrinsics

Talkat DotNext 2019 Moscow · 2019-11-06..11-07· [dotnet]
links:none on file
slides:none on file

Rebuilds CoreCLR's quicksort partition in C# using .NET Core 3.0 hardware intrinsics (AVX2, 256-bit vectors), implementing movemask+permute lookup (256 entries), popcount and branchless writes to produce left/right counts. Adds pointer-cast fixes, loop unrolling, cache-line alignment by over-reading, and a vectorized bitonic sort for 8-wide vectors for small runs. Benchmarks show an initial 2.7x win over CoreCLR C++ and a tuned end-to-end result near 9x faster on 1M integers, so the implementation succeeds.

AI-written summary · about

  1. 0:00Introduction
  2. 2:00Singlethreaded performance improvement
  3. 3:05Jim Keller
  4. 7:30Why intrinsics
  5. 8:50Vectorization
  6. 9:40Sorting
  7. 11:05Why quicksort
  8. 12:40Quicksort basics
  9. 15:12Quicksort numbers
  10. 15:50Vectorize intrinsics
  11. 16:20New primitive types
  12. 17:20Vectorize registers
  13. 21:53Masks
  14. 22:06Looping
  15. 22:48Permutation table
  16. 29:11Stack allocation
  17. 33:38Whats next
  18. 34:42Local variables
  19. 36:21Fatih
  20. 40:47Data dependent
  21. 41:59Arithmetic optimum optimization
  22. 44:15Poormans see move
  23. 45:16Simpler solution
  24. 46:34Branch misprediction
  25. 47:03The remainder problem
  26. 48:33Cache line boundaries
  27. 50:45Our situation
  28. 51:35Partitions
  29. 52:00Partitioning
  30. 54:08Optimization
  31. 54:49Hybrid Sorting
  32. 55:41Tonic Sort
  33. 59:15Speedup
  34. 59:47Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.