Loops and iterations

Envision relies first and foremost on its relational algebra features to iterate over large collections of data: every operation in Envision is applied to all the lines of a table. Such vectorized operations are well-optimized both in terms of speed and memory usage, and should be used whenever possible.

For cases when a computation cannot be expressed using the vectorized operations alone, Envision provides several advanced iteration features:

The design of Envision enforces a constraint on all forms of iteration: any loop, no matter how complex, must have a maximum number of iterations. This excludes loops that run until a condition becomes false (the while loops of many languages).

Other language features, such as montercarlo and autodiff, also rely on iteration to execute their body several times.

User Contributed Notes
0 notes + add a note