title: Slow multiplication of transpose of sparse matrix
body: <p>I'm having speed issues multiplying the transpose of a sparse matrix with a column vector.</p>
  <p>In my code the matrix A is</p>
  <blockquote>
  <p>501×501 SparseMatrixCSC{Float64, Integer} with 1501 stored entries:</p>
  </blockquote>
  <p>⠻⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸</p>
  <p>⠀⠈⠻⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸</p>
  <p>⠀⠀⠀⠈⠻⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸</p>
  <p>⠀⠀⠀⠀⠀⠈⠻⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⢸</p>
  <p>⠀⠀⠀⠀⠀⠀⠀⠈⠻⣦⡀⠀⠀⠀⠀⠀⠀⢸</p>
  <p>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣦⡀⠀⠀⠀⠀⢸</p>
  <p>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣦⡀⠀⠀⢸</p>
  <p>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣦⡀⢸</p>
  <p>⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠈⠻⣾</p>
  <p>These are the results I get from the multiplication with <code>f0 = rand(Float64,501,1)</code>:</p>
  <p><strong>Method 1</strong></p>
  <p><code>A_tr = transpose(A)</code></p>
  <p><code>@benchmark A_tr*f</code></p>
  <p>BenchmarkTools.Trial: 10000 samples with 1 evaluation.</p>
  <p>Range (min … max):  350.083 μs …   9.066 ms  ┊ GC (min … max): 0.00% … 95.44%</p>
  <p>Time  (median):     361.208 μs               ┊ GC (median):    0.00%</p>
  <p>Time  (mean ± σ):   380.269 μs ± 355.997 μs  ┊ GC (mean ± σ):  4.06% ±  4.15%</p>
  <p>Memory estimate: 218.70 KiB, allocs estimate: 11736.</p>
  <p><strong>Method 2</strong></p>
  <p><code>A_tr = Matrix(transpose(A))</code></p>
  <p><code>@benchmark A_tr*f</code></p>
  <p>BenchmarkTools.Trial: 10000 samples with 1 evaluation.</p>
  <p>Range (min … max):  87.375 μs … 210.875 μs  ┊ GC (min … max): 0.00% … 0.00%</p>
  <p>Time  (median):     88.542 μs               ┊ GC (median):    0.00%</p>
  <p>Time  (mean ± σ):   89.286 μs ±   3.266 μs  ┊ GC (mean ± σ):  0.00% ± 0.00%</p>
  <p>Memory estimate: 4.06 KiB, allocs estimate: 1.</p>
  <p><strong>Method 3</strong></p>
  <p><code>A_tr = sparse(Matrix(transpose(A)))</code></p>
  <p><code>@benchmark A_tr*f</code></p>
  <p>BenchmarkTools.Trial: 10000 samples with 9 evaluations.</p>
  <p>Range (min … max):  2.102 μs …  1.017 ms  ┊ GC (min … max): 0.00% … 99.40%</p>
  <p>Time  (median):     2.477 μs              ┊ GC (median):    0.00%</p>
  <p>Time  (mean ± σ):   2.725 μs ± 13.428 μs  ┊ GC (mean ± σ):  6.92% ±  1.41%</p>
  <p>Memory estimate: 4.06 KiB, allocs estimate: 1.</p>
  <p>Why doesn't Method 1 produce a similar performance as Method 3? I'm probably missing something basic here.</p>
  <p>Thank you for your help!</p>