Optimization by runtime specialization for sparse matrix-vector multiplication