Skip to main content

Module cost

Module cost 

Source
Expand description

成本模型:默认节点权重表。

目标是给“改写后是否更简单”一个可比较的量:语句与临时变量比表达式贵, 字面量/变量引用最便宜。语言可经 Lang::cost_weight 覆盖。

Functions§

default_weight
subtree_cost
迭代式子树成本(防爆栈)。