We suggest that straight-line programs designed for algebraic computations should be accompanied by a comprehensive complexity analysis that takes into account both the number of fundamental algebraic operations needed, as well as memory requirements arising during evaluation. We introduce an approach for formalizing this idea and, as illustration, construct and analyze straight-line programs for the Bruhat decomposition of [Formula: see text] matrices with determinant [Formula: see text] over a finite field of order [Formula: see text] that have length [Formula: see text] and require storing only [Formula: see text] matrices during evaluation.