~/talk

Using Integers as Arrays of Bitfields a.k.a. SWAR Techniques

Talkat CppCon 2019 · 2019-09-15..09-20· [c-and-cpp]
slides:none on file

A C++11 library implements SWAR (treating 64-bit words as arrays of bitfields) to brute-force Texas Hold’em equities and it actually classifies ~2 billion opponent/community combos in ~18 seconds — about 114 million classifications/sec or ~26 cycles per hand. Techniques: masks, shifts, element-wise subtraction to get booleans, recursive bitwise population-count logic (competes with popcnt via compiler auto-vectorization), and a next subset routine (213 ops). Design avoids huge lookup tables and proves practical, high-throughput speed.

AI-written summary · about

  1. 0:00Introduction to techniques
  2. 1:30SIMD and architecture
  3. 2:44SWAR techniques explained
  4. 6:00Benefits of SWAR
  5. 10:13Poker simulation case study
  6. 15:18C++ and SWAR integration
  7. 19:10Detecting three of a kind
  8. 23:21Bit manipulation strategies
  9. 26:41Vertical vs horizontal ops
  10. 30:16Implementing hand logic
  11. 34:29Population count techniques
  12. 38:22Compiler optimization analysis
  13. 44:23Advanced algorithms
  14. 46:57Conclusion and Q&A
~/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.