~/talk

Three techniques for building high performance parsers

slides:none on file

Shows an implementation that replaces encoding/json.Decoder with a streaming, allocation-conscious parser using a windowed byte reader that returns subslices, a tokenizer inlining hot paths to avoid per-byte function calls, and a state machine that stores state-as-function handlers to eliminate branch mispredictions. Claims: tokenized decoding is ~2–3× faster than encoding/json for Decoder-style API, up to 10× faster using the subslice NextToken API, and 1–1.5× for full Unmarshal; code is live and reduces allocations substantially.

AI-written summary · about

  1. 0:00Project goals and philosophy
  2. 1:27The costs of memory allocation
  3. 4:25Tokenizing JSON streams
  4. 11:13Implementing a byte reader
  5. 18:05Scanner and state management
  6. 22:53Optimizing scan performance
  7. 25:45Inlining and code structure
  8. 30:08Building the JSON decoder
  9. 38:28Conclusion and summary
~/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.