206. A fn's estimated cost includes what the fns it calls cost (2026-11-22)
- Decision. A fn's estimated cost now adds, for each call of a fn in
the same file, that fn's documented and fixed-cost calls times how often
the call runs. Before, only the called fn's loop iterations were added,
so
for j in 0..k: order(cells)withordersortingcellshoveredO(k), about 7 steps. Now it hoversO(k + k * (n log n)). If the called fn has a call with no stated cost, the caller gets no estimate. TheO(..)terms leave out fixed-cost calls, as a fn's own do. - Why. The old total was an undercount whenever a helper did work other
than loops, which breaks the rule that an estimate is never an
undercount. On the 1,332 fns in
corpus/problemsports, 2 lose an estimate that was too low (cf2157f'sbest_plancallschoose, which states no cost) and none gain one, leaving 37. - Reverse. Drop the
helpersloop infn_extraincpl-lsp'sserver.rsandProvenFn::helpersincpl-lint.