The Yin and Yang of Mutability
summary
Examines two new BEAM VM mutability features added in OTP 21.2—atomic counters and persistent terms—using an hdr histogram implementation as a concrete example. Explains how they behave, their caveats and limitations, and presents benchmarks to show when measurement is necessary.
AI-written summary · about
chapters (16)
- 0:00Start
- 0:15Yin and Yang
- 0:36Motivation
- 1:55Compromise for performance
- 2:16Cracks on the wall
- 4:16ETS counters, still not enough
- 7:04Atomics internals
- 8:11Write-concurrency counters
- 8:55Atomics/counters reference
- 9:42Persistent term vs
- 12:07Persistent term - update
- 13:56Persistent term - get
- 17:26Danger of PT update
- 18:22Summary
- 19:04References
- 19:35Histogram with atomics








