logoalt Hacker News

edflsafoiewq • today at 10:49 AM • 0 replies • view on HN

Yes. It applies to "linear algorithms", which are basically functions of the form

  fun f(x1, x2, x3, ...):
    t1 = 3*x1 + 2*x2
    t2 = 4*t1 + 5*x3
    ...
    return (some subset of t vars)
where each ti is a linear combination of previous t vars, inputs x vars, or constants.

The cost model is just the number of additions performed.