I want to calculate $y^T \cdot \operatorname{diag}(A^T B A) \cdot y$. - $y$ is a $N \times 1$ vector - $A$ is a $m \times N$ matrix where $N \gg m$ - $B$ is a $m \times m$ matrix, and B is a symmetric positive definite matrix, the Cholesky decomposition $B = LL^T$ is precomputed if it is needed. Is it possible to calculate the above expression in $O(Nm)$ complexity?