Precomputation

Part of a 20th-century precomputed mathematical table of common logarithms.

In algorithms, precomputation is the act of performing an initial computation before run time to generate a lookup table that can be used by an algorithm to avoid repeated computation each time it is executed. Precomputation is often used in algorithms that depend on the results of expensive computations that don't depend on the input of the algorithm. A trivial example of precomputation is the use of hardcoded mathematical constants, such as π and e, rather than computing their approximations to the necessary precision at run time.

In databases, the term materialization is used to refer to storing the results of a precomputation,[1][2] such as in a materialized view.[3][4]

  1. ^ Jiawei Han; Micheline Kamber (9 June 2011). Data Mining: Concepts and Techniques: Concepts and Techniques. Elsevier. p. 159. ISBN 978-0-12-381480-7.
  2. ^ Sven Groppe (29 April 2011). Data Management and Query Processing in Semantic Web Databases. Springer Science & Business Media. p. 178. ISBN 978-3-642-19357-6.
  3. ^ Karen Morton; Kerry Osborne; Robyn Sands; Riyaj Shamsudeen; Jared Still (28 October 2013). Pro Oracle SQL. Apress. p. 48. ISBN 978-1-4302-6220-6.
  4. ^ Marie-Aude Aufaure; Esteban Zimányi (16 January 2012). Business Intelligence: First European Summer School, EBISS 2011, Paris, France, July 3-8, 2011, Tutorial Lectures. Springer Science & Business Media. p. 43. ISBN 978-3-642-27357-5.