~/talk

Pyrobuf and the Tyranny of Speed

Talkat PyCon AU 2016 · 2016-08-12..08-16· [python]
links:none on file
slides:none on file

Pyrobuf is a Cython implementation of Protobuf that generates a custom C-extension per .proto file and claims 2–4× vs C++ backend and 20–40× vs pure Python serialization speed, requiring a C compiler and supporting Python 2.7 and 3.5. Benchmarks use pytest-benchmark. Practical optimizations shown include bypassing __init__ for fast instantiation, avoiding string slicing by passing offsets, and skipping type-guard checks to shave single-digit percentages. CaptainProto serializes ~6× faster and deserializes ~3× faster but is ~4× slower end-to-end. Tradeoffs include bugs, security, and compatibility costs.

AI-written summary · about

  1. 0:00Intro
  2. 0:53About Me
  3. 1:22Outline
  4. 1:48What is the Problem?
  5. 3:42XML and JSON
  6. 4:13Pickle
  7. 6:49Backwards and Forwards Compatibility
  8. 11:17General Advice on Optimising Code
  9. 12:29Static Type Declarations
  10. 14:03First You Need to Measure It
  11. 16:31Cython Fast Instantiation
  12. 18:02Avoid unnecessary Slicing
  13. 19:56Sacrifice Correctness!
  14. 22:09How Does Cap'n Proto Achieve this Miracle?
  15. 23:30Performance is a Race!
~/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.