~/talk

Low-level optimization of algebraic and similar structures

Talkat Rusty Days 2020 · 2020-07-27..08-02· [rust, machine-learning]
links:none on file
slides:none on file

Rust actually changes layouts: zero-sized types occupy 0 bytes and the never type removes whole error variants, structs get field reordering to reduce padding, and enums get pointer/NonZero optimizations plus discriminator flattening for Option-like enums. Code analysis uses a Rust parser over >1,000 enum declarations and finds over 40% enums with zero-field variants and about one in six that “look like Option.” Async state machines get re-layout that can cut future size by 1/3 and reduce previously kilobyte-sized futures.

AI-written summary · about

  1. 0:00Introduction
  2. 1:08Presentation plan
  3. 3:30Key operators
  4. 6:03Empty tuple
  5. 8:31Never type
  6. 10:37Multiple optimization
  7. 16:19Product flattening
  8. 19:22Statistics
  9. 20:11Invariants
  10. 31:24Remarks
  11. 32:04Questions
  12. 34:33State machine
  13. 35:34Zero bit patterns
  14. 38:16Flattening options
  15. 39:39Phantom types
~/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.