~/talk

PSCustomObject[] vs Hashtables: The ultimate object smackdown

slides:none on file

Concrete numbers and demos decide: building maps for 10,000 fake users and matching 5,000 keys with naive Where-Object runs tens of seconds (≈30s), ForEach-Parallel cuts that to ~21s, a Break-on-find loop ≈15s, converting users to a List and removing hits finishes ~100ms, building a lookup Hashtable keyed by email finishes ≈70ms. Converting JSON to PSCustomObject is prettier but slightly slower than Hashtable conversion, creating PSCustomObjects with the type accelerator is ~68ms vs New-Object ~200ms per 1000 runs, and containskey vs -contains shows large perf differences. Output formatting, ordered hashtables, nesting, and a LINQ-style join also appear and work.

AI-written summary · about

  1. 0:00Introduction
  2. 2:39PS objects vs hashtables
  3. 5:12Hashtables structure
  4. 11:34Creating PS objects
  5. 14:43Updating properties
  6. 21:03Output formatting
  7. 27:20Iterating through hashtables and PS objects
  8. 34:22Performance comparison
  9. 45:21Summary & Q&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.