~/talk

Mastering JavaScript Collections: Arrays, Maps, Sets, and Beyond

Talkat XtremeJS 2024 · 2024-11-12..11-13· [javascript]
slides:none on file

Covers concrete tradeoffs: use typed arrays for big numeric/binary workloads to get much better performance; prefer Map over plain objects to avoid prototype-key collisions and to accept non-string keys with generally better lookup speed; remove duplicates with [...new Set(array)]; use WeakMap caching or WeakSet when holding many large objects so the garbage collector can free keys and prevent OOM; Maps don’t JSON-serialize directly and a TypeScript .js library adds more collection types and generics.

AI-written summary · about

  1. 0:00JavaScript collections intro
  2. 1:05JavaScript arrays deep dive
  3. 4:16Objects vs arrays for storage
  4. 6:24Working with Maps
  5. 9:36Maps vs objects
  6. 11:00Sets for uniqueness
  7. 13:33WeakSet for garbage collection
  8. 15:42WeakMap for caching
  9. 19:44External collections libraries
  10. 20:50Choosing the right collection
~/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.