Building a high-performance Future
summary
An open-source reimplementation called trane.io replaces Twitter’s Future internals, trading many per-element closures for shared collector objects and Java collections and using arrows to avoid allocations. Microbenchmarks report reduced allocations: 6→2, 128→48 bytes and orders-of-magnitude throughput wins on simple maps; production changes yield ~50% better throughput on some hot paths, 18% fewer allocations, and a 16% increase in requests served for one service with 4 MB/s fewer allocation traffic. Work relies on JMH, YourKit, VTune, JITWatch.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:40Background
- 1:36Stage
- 6:28Trader Future
- 9:19Allocations in Scala
- 12:03Avoiding Closures
- 14:19Merging interfaces
- 15:25Optimizations
- 16:44Benchmarking
- 18:39Profiling
- 19:16Advanced profiling
- 21:31JIT refining
- 23:03Benchmarks
- 24:29io
related talks
49mTrading in Futures
46mJava 21: The revolution of virtual threads - A Deep dive
43mParallel and Thread-Safe Ruby at High-Speed with TruffleRuby
51mThe Need for Async
01h 04mAtomics, Locks, and Tasks (part 2 of 2)
39mUnlocking Data-Intensive Applications with Virtual Threads
52mThread internals and related design patterns
01h 28mThere Is A Better Future
