mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-09 12:00:01 -06:00
A function lifted over a computed array runs once per element, and only the six lookups counted their repeated work against LIFTED_SCAN_BUDGET. Criteria aggregates rescanned their ranges per criterion, CUMIPMT/CUMPRINC stepped through up to 1e7 periods per element, and array-producing functions such as MUNIT built a whole result per element before keeping its first cell. The budget now covers all of it: COUNTIF/SUMIF/AVERAGEIF(S)/MAXIFS/MINIFS charge their range cells per call, the period loops of every element are added up before any runs, and array results charge their cells as they are built. Past the budget the call is #NUM!, as lifted lookups already are.