I recently read Wolfgang's answer to the question found here and found myself wondering about a related followup question.
Assume you have two sparse matrices $A$ and $B$. You need to do the matrix-vector multiplication $a = Xb$ where $X=AB$. He states in his answer that forming X is much more intensive than just doing two multiplies in the form $a=A(Bb)$, which is for the most part intuitive.
My question is, what if you have many $b$'s? Let's assume you have $n$ different $b$'s to multiply. How large does $n$ have to be in relation to the size/sparsity of $A$ and $B$ to make forming $X$ worthwhile or does forming $X$ never become more efficient? If nothing can be said in general, are there specific cases where conclusions can be drawn?