March 4, 2011

Immediate/Lazy Execution Terms

Deferred execution and eager evaluation

Immediate Execution - means that the computation/execution is done in the function and finished once the function return. (Fully eager evaluation as most C# code does)
Deferred/Eager Execution (buffering) - means that most of the work will be done on the first MoveNext() or when the IEnumerator instance is created (For IEnumerable it is when GetEnumerator is called)
Deferred/Lazy Exceution (streaming) - means that the work will be done each time GetNext() is called but nothing before.

No comments: