Fastware
summary
Shows concrete rewrites and measurements: replace division by constants with multiplication+shift (compiler already does this), count digits via chunking for 2–6× speedup, convert uint64→ASCII by computing length first to avoid indirect writes for ~2× on small numbers, and parse integers by removing data dependencies to expose instruction‑level parallelism and use loop unrolling. Uses gcc.godbolt for inspection, measures with profilers (perf/VTune) and ships code in Facebook folly; results are reproducible and significant.
AI-written summary · about
chapters (17)
- 0:00Intro
- 2:32Down to Earth
- 3:39New Research
- 13:00Strength reduction: Example
- 24:52Minimize Indirect Writes: Why?
- 33:30Improvements
- 39:58Study: String to Integral
- 41:28How does it work?
- 43:22Divide & Conquer?
- 43:41Key: Multiply, then add
- 44:30Reducing dependencies
- 47:29Strength reduction, again
- 48:39Tip: Use Bitwise Ops
- 49:42Tip: Use isdigit
- 50:36Pro Tip: Use unsigned wraparoo
- 54:33Think Outside the Loop
- 55:08Checkpoint
related talks
44mFastware
01h 02mFastware
23mBeating the Benchmarks: Co-evolving the ISA and Development Tools
56mWrite Fast Code Like a Native
49mWriting better code with help from Qt and the compiler
42mAdventures in Efficiency and Performance
01h 04mThe Future of Fast Code: Giving Hardware What It Wants
51mTutorial: Performance Tools
