~/talk

Optimizing code in the hot path; with examples from tuple deformation

Talkat PGConf.dev 2026 · 2026-05-19..05-22· [databases]
slides:none on file

Optimizes PostgreSQL tuple deformation by shrinking attribute metadata, precomputing cached offsets, replacing per-bit null checks with a SWAR null-bit trick, and turning indirect calls into sibling/tail jumps; profiling with perf record and perf stat shows instructions-per-cycle rising and runtime dropping from ~305 ms to ~206 ms after those patches, and a proposed selective deforming method cuts the benchmark to ~55 ms (≈5.5× faster). Benchmarks and CPU assembly analysis validate each change.

AI-written summary · about

  1. 0:00Introduction and overview
  2. 1:31Profiling with Perf
  3. 8:55Tuple deformation basics
  4. 12:28Optimizing attribute struct
  5. 15:25Removing branching in macros
  6. 20:24Simplifying null checks
  7. 22:51Benchmarking strategies
  8. 24:56Sibling and tail calls
  9. 28:52Bit manipulation with SWAR
  10. 33:52Proactive offset caching
  11. 37:48Selective tuple deformation
  12. 41:43Summary and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.