~/lightning

Lightning Talk: How to Cook Your CPU with C++

Lightningat C++ on Sea 2025 · 2025-06-23..06-25· [c-and-cpp]
links:none on file
slides:none on file

A change in compiler optimization from -O0 vs -O2 turns a benign spin-check into an infinite loop that pins a core at 100% CPU after a rebuild, because the compiler assumes a locally-read flag never changes and optimizes away repeated checks. Tracing uses htop, perf and GDB plus quick assembly inspection to confirm the jump-generated loop. The practical fix is to use proper synchronization such as atomic_bool (or another suitable primitive) instead of a plain variable.

AI-written summary · about

~/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.