Functional Mechanical Sympathy
summary
Argues that performance drives adoption: many popular JavaScript build tools are rewritten in Rust/Go rather than FP languages, and benchmarks show practical differences — Node ~25k req/s, Go degrades around ~70k, Elixir sustains ~100k requests per second. Shows FP can win when architecture matches hardware (Elm’s “blazing fast” rendering, Haskell’s Warp outpacing Nginx with multiple workers) and drills into hardware costs (1 ns L1 cache hit, 100 ns main memory, 17 ns mutex). Demonstrates bad FP examples (non‑tail recursive “quicksort”), Elm compiler heap‑allocation reductions, and runtime strategies like opportunistic mutation with ARC, borrow inference and defunctionalization to get imperative performance from pure code.
AI-written summary · about
chapters (30)
- 0:00Welcome
- 1:07JS functional growth
- 3:56Rust and Go vs FP
- 7:07Performance critical
- 8:50Elm’s UI performance
- 10:37Go vs Elixir benchmarks
- 12:21Haskell’s Warp lead
- 14:29Heap allocations in FP
- 15:32Crafting compelling performance pitches for functional tools
- 17:15FP performance pitfalls
- 19:19Functional quicksort myth
- 22:49Persistent data structures wins
- 25:17Mechanical sympathy beyond FP
- 28:02Hardware vs abstractions
- 31:52Hardware costs numbers
- 37:50CPU cache hierarchy
- 39:56Prefetching patterns
- 41:38Linked lists slow?
- 51:39Informed choices
- 52:21Caching pure functions
- 53:24Effect wrapper costs
- 54:05Immutable trees vs maps
- 54:48Lazy evaluation costs
- 55:09Elm’s compiler optimizations
- 56:33Opportunistic mutation
- 59:42Borrow inference in Rock
- 1:01:04Resources
- 1:02:47Summary
- 1:04:54Q&A: Language design
- 1:07:15Q&A: Tooling
related talks
45mFunctional programming vs. Object-oriented Programming
01h 06mDesigning Applications with Functional Programming Constructs
45mFunctional Programming in the Large - Status and Perspective
39mUsing Nicer Programming Languages at Work
01h 02mFishbowl @ Functional Conf
45mThe Joy of Building Large Scale Systems
36mWhen to be Weird
31mBuilding a Sustainable CodeBase with FP
