~/talk

WHAT Was Too Slow?!? (When sprintf() Is A Performance Bottleneck)

Talkat linux.conf.au 2022 · 2022-01-14..01-16· [databases]
links:none on file
slides:none on file

Identifies sprintf as a PostgreSQL export bottleneck and replaces divide-based digit counting with precomputed tables plus bit ops, cutting per-integer work to one clz, one table lookup, one add and one shift. Implements a 32-entry table for 32-bit integers (magic constants = differences of 2^n and 10^m), making printing branch-reduced and roughly 5% faster in benchmarks. Code targets PostgreSQL exports now and aims for upstream libc adoption.

AI-written summary · about

  1. 0:00Introduction
  2. 1:39Welcome
  3. 3:23Explanation
  4. 5:04Background
  5. 5:45Postgres
  6. 6:06Beta Export
  7. 8:53Daniel Lumiere
  8. 10:06Binary Integers
  9. 11:35Magic Numbers
  10. 12:57Fewer Instructions
  11. 13:34New Code
  12. 14:14Can We Get It Faster
  13. 15:31More Questions
  14. 16:04Nostalgia
  15. 17:07Questions
  16. 23:53Next Question
~/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.