~/talk

Speed up Python data processing with vectorization

Talkat PyData Global 2022 · 2022-12-01..12-03· [web-performance]
slides:none on file

Vectorization means using array-backed APIs to bypass per-item Python overhead and get order-of-magnitude speedups. Using NumPy and Pandas, a Python for loop summing 30 million integers takes ~2 s while numpy.sum takes ~20 ms — about 100× faster. Store data in typed arrays, prefer bulk APIs over Python iteration or builtins like sum or map, and confirm the function iterates internally rather than calling back into Python per item.

AI-written summary · about

  1. 0:00Python vectorization intro
  2. 4:40Why Python is slow
  3. 11:25Vectorization bypasses overhead
  4. 16:46Defining vectorized APIs
  5. 18:31Fast data processing tips
  6. 23:05Summary
  7. 23:50Q&A
~/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.