Skip to content

Precomputation

Computing expensive results in advance and storing them trades upfront computation and storage for faster reads; effective when reads vastly outnumber writes

Tension Addressed

Memory vs. Computation

Recognizable As

Lookup tables, materialized views, pre-rendered content, compiled assets, indexes

Canonical Sources

Garcia-Molina et al., "Database Systems: The Complete Book" - Materialized Views; Bentley, "Programming Pearls" (1986)

Transfers To

Database design, web content delivery, game development, any read-heavy system

The inverse of lazy evaluation - compute everything upfront. Most effective when the set of possible queries is bounded and reads dominate writes.