~/talk

C++ as an Optimizing Assembler - a Performance Talk

Talkat CppNorth 2023 · 2023-07-17..07-19· [web-performance]
links:none on file
slides:none on file

Builds a tiny C++ runtime compiled with -nostdlib and -march=haswell that invokes Linux syscalls directly (write exit open close mmap) and fixes TLS by allocating a 4K page and setting FS, reads generated assembly with Intel syntax in GDB, measures hotspots with perf record and microbenchmarks with nanobench, optimizes an i2a routine by doing two digits at once and removing cache-misleading lookup tables, verifies std::vector push_back has a real-lock cost (~33 ms in the test), and shows a Bolin compiler prototype reaching about 3.1M lines/s.

AI-written summary · about

  1. 0:00Introduction and goals
  2. 1:50Writing a custom runtime
  3. 8:26Implementing system calls
  4. 15:34Thread-local storage fix
  5. 17:01Optimization basics with perf
  6. 22:38Optimizing integer to ASCII
  7. 29:43Cache and memory insights
  8. 30:45STD vector lock experiment
  9. 33:13Compiler performance results
~/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.