~/talk

Processing One Billion Rows in PHP

Talkat API Platform Conference 2024 · 2024-09-19..09-20· [php]
slides:none on file

Shows that PHP can aggregate 1B rows (≈13 GB) by iterating file lines, using fgets/stream_get_line and avoiding fgetcsv, minimizing hashmap lookups with references, pre-casting numbers to floats, enabling OPCache/JIT, and splitting work across parallel threads (12 cores). Starts at ~25 minutes on a laptop, improves to ~19m49s, 13m32s, 7m19s, then 1m35s with threading and optimized build, and reaches ~12.8 seconds after stream_get_line and other micro-optimizations. Demonstrates a working, reproducible pipeline and measurable speedups.

AI-written summary · about

  1. 0:00Introduction
  2. 1:02The 1 Billion Row Challenge
  3. 2:53Rules and constraints
  4. 4:27Initial implementation
  5. 7:07Performance profiling
  6. 10:33Optimizing array access
  7. 13:51Fixing type juggling
  8. 16:57Enabling JIT compiler
  9. 18:50Parallel processing
  10. 26:19Refining the implementation
  11. 30:04Final optimizations
  12. 33:07Conclusion
~/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.