请输入您要查询的字词:

 

单词 lazy evaluation
释义
lazy evaluation

Computer
  • An execution mechanism in which an object is evaluated only at the time when, and to the extent that, it is needed. This allows programs to manipulate objects, such as lengthy or infinite lists, whose evaluation would otherwise be needlessly time-consuming or indeed fail to terminate at all. An illustration is the problem of comparing two trees, t1 and t2, to test whether the leaves of t1, read from left to right, form the same list as the leaves of t2. The simplest solution is first to construct the two leaf-lists and then to compare them element by element. Lazy evaluation allows this program to interleave the construction of the two leaf-lists and then test for equality. The program can then terminate as soon as the lists are found to differ, without having unnecessarily constructed both lists in toto. See also strictness.


随便看

 

科学参考收录了60776条科技类词条,基本涵盖了常见科技类参考文献及英语词汇的翻译,是科学学习和研究的有利工具。

 

Copyright © 2000-2023 Sciref.net All Rights Reserved
京ICP备2021023879号 更新时间:2024/6/24 20:40:28