The 1000x Spreadsheet: Performance from first principles
Follow Causal's journey of scaling their spreadsheet engine from thousands to billions of cells. Profilers are helpful but first-principle thinking is required to break out of iterative improvements and make order of magnitude improvements.
productivity, not performance. Use errgroup. - Anything that needs safety can go into a Context. - Run go test --race in CI! Practice safe concurrency 🫃
so, is it really sparse? - The real cost of maps will never show up on profiles. - Flame charts don’t show CPU cache misses. Maps in Golang are really fast 🤷 👍 - Golang hashes things really fast. Especially integer-keys.
world has too much variance (esp. on public clouds like GCP/ AWS). - Simpler POC → Faster iteration → More experimentation. - The simplest Causal model is adding up two variables with millions of cells.