Trace-driven simulation has been widely used to evaluate the performance of cache memory. Prior to this investigation, a number of research projects were proposed for reducing the long execution time of trace-driven simulation. In the paper, a one-pass algorithm, called the Hash-RM algorithm, is proposed which is both simple and efficient. The Hash-RM algorithm facilitates simulation by reducing the average search depth and using the right-match comparison. Since the Hash-RM algorithm can be adapted to simulation of direct-mapped, set-associative and fully-associative caches simultaneously, it is compared to the all-associativity algorithm proposed by Hill and Smith. For instruction traces, the results indicated that the present algorithm is not making great progress because of the preferable locality. For data traces, however, the results showed that the Hash-RM algorithm is much faster than the all-associativity algorithm. Implications of the results are discussed in detail.