A Technique for Improving Performance of Moderately Sparse Matrix Algorithms