Speedup DiagMatrix