Numbers every Scala programmer should know
summary
Argues that concrete, measured numbers drive optimization: uses JMH microbenchmarks on laptop and AWS to compare I/O, CPU and data-structure costs and shows surprising shifts (datacenter network throughput ~64× faster since 2005, JSON parse ~10µs for 2KB, single DB write ~5ms). Demonstrates that batch DB writes often cut latency by an order of magnitude, that blocking I/O saves CPU (non‑blocking only helps when CPU is the bottleneck), and that avoid List for >50 items while preferring for/while loops in hot paths.
AI-written summary · about
chapters (19)
- 0:00Intro
- 1:43Why software performance matters
- 3:33Case studies
- 7:45What do the numbers tell us?
- 9:49Pipelining and Amortization
- 11:40Basic modern types of infrastructures
- 13:25Why data pipelines?
- 14:57Services, requests and inner loops
- 16:21Complexity analysis
- 17:03Optimizing expensive operations
- 19:48Performance of expensive operations
- 20:32Example analysis (answer)
- 22:18Total application performance
- 26:41Asynchronous performance impact
- 32:31Recursion and Loops benchmark code
- 35:25Collection benchmark methods
- 35:58Collection benchmark code
- 37:08Mutability benchmark methods
- 40:14How does this help us design software?
related talks
54mHow Not to Write Slow Scala
23mThe Future of Scala Performance on Big Data
30mThe Future of Scala Performance on Big Data
50mIs scala code slow?
40mLudicrous Speed: Designing For Performance on the JVM
39mMemory Efficient Java
45mThe Joy of Building Large Scale Systems
48mHigh performance Scala systems without tears
