Right now, circshift falls back to the generic AbstractMatrix implementation when called with a SparseMatrix (being very slow and adding unnecessary structural zeros values in the output).
Adding something simple like the following seems to do the job. So… what is the best way to get it added?
function circshift!(O::SparseMatrixCSC, X::SparseMatrixCSC, (r,c)::Tuple{T,T}) where T<:Int
I,J,V = findnz(X)
O .= sparse(map(i->mod1(i + r, X.n), I), map(j->mod1(j + c, X.m), J), V, X.n, X.m)
end