Don't recompute getNumOperands for each iteration.