The Cost of Abstractions
summary
Benchmarks compare plain async TypeScript, an effects library, FPTS (old and newer), and Rust (native and WASM) on a 100,000‑order workflow with 5% failures and 20 warmups, taking the minimum of four runs. TypeScript shows 3x slowdown with the effects library, 5x slowdown with the newer FPTS, while the type‑state pattern has no runtime cost. Rust native keeps abstractions nearly zero cost; Rust→WASM adds about 2x overhead but still outperforms TypeScript with heavy abstractions.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:04Talk origin and abstractions
- 2:27Library order workflow example
- 3:32Plain async TypeScript
- 3:53Effect composition abstractions
- 5:36Type state for errors
- 7:20Abstraction and maintainability
- 9:29Cost of abstractions
- 11:14Benchmarking TypeScript
- 14:44Zero-cost abstractions in Rust
- 17:38Rust benchmarks
- 20:50Rust vs WebAssembly
- 22:57Abstraction space navigation
- 24:24Avoiding tunnel vision
- 25:28Context-driven solutions
related talks
30mRust in the Browser for Javascripters:New Frontiers,New Possibilities
29mNo free lunch: Limits of WASM as a bridge from Rust to JS
30mImproving web app with Rust and WASM
24mA Snapshot of the Performance of Wasm Backends for Managed Languages
20mUsing Rust and WASM
28mPowering Up NodeJS Performance by Rust and WebAssembly
22mExtending JavaScript with Rust
43mDo things blazingly fast with WebAssembly
