# Matrix multiplication of a view of QR.Q with Vector{VariableRef} is slow

**URL:** https://discourse.julialang.org/t/matrix-multiplication-of-a-view-of-qr-q-with-vector-variableref-is-slow/74480
**Category:** Performance
**Tags:** jump, linearalgebra, sparse
**Created:** [January 12, 2022, 12:11pm UTC](https://discourse.julialang.org/t/matrix-multiplication-of-a-view-of-qr-q-with-vector-variableref-is-slow/74480 "2022-01-12T12:11:48Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [January 12, 2022, 2:10pm UTC](https://discourse.julialang.org/t/matrix-multiplication-of-a-view-of-qr-q-with-vector-variableref-is-slow/74480/6 "2022-01-12T14:10:18Z")

</div>

> [@Thomas](#):
>
> Extracting columns of QR.Q (obtained from sparse qr call) by matrix multiplication with `Matrix(I, size(QR.Q,1), r)` is really fast!!!

As I mentioned above, however, you have to be careful because sparse QR also includes a permutation of the input and output rows, e.g. as employed [here](https://discourse.julialang.org/t/differences-in-a-b-for-sparse-and-nonsparse-rank-deficient-a/66917/5). That is, `F.Q` may not mean what you think it means.

---

_[View the full topic](https://discourse.julialang.org/t/matrix-multiplication-of-a-view-of-qr-q-with-vector-variableref-is-slow/74480)._
