~/talk

Python's other collection types and algorithms

Talkat EuroPython 2011 · 2011-06-20..06-26· [python]
links:none on file
slides:none on file

Explains concrete Python tradeoffs and shows code: lists use geometric growth for amortized O(1) append; collections.deque gives O(1) pops left and is ~750× faster on large queues and ~25× faster even for small push/pops; use bisect for binary search (beats linear after ~46 items); use heapq or heapq.nlargest to keep top-k without sorting everything; defaultdict/Counter simplify counting and grouping; namedtuple and OrderedDict provide readable tuples and insertion-ordered mappings; builds working examples (BFS/DFS queues, sliding-window history, inverted letter→words index).

AI-written summary · about

  1. 0:00Start
  2. 0:36Lists
  3. 19:07Binary Search
  4. 35:47Sets
  5. 38:54Set Operations
  6. 42:10Dictionaries
  7. 48:50Ordered Missionary
~/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.