Extended Pairing Heap Algorithms Considering Cache Effect

캐쉬 효과를 고려한 확장된 Pairing Heap 알고리즘

  • Published : 2003.06.01

Abstract

As the memory access time becomes slower relative to the fast processor speed, most systems use cache memory to reduce the gap. The cache performance has an increasingly large impact on the performance of algorithms. Blocking is the well known method to utilize cache and has shown good results in multiplying matrices and search trees like d-heap. But if we use blocking in the data structures which require rotation during insertion or deletion, the execution time increases as the data movements between blocks are necessary. In this paper, we have proposed the extended pairing heap algorithms using block node and shown by experiments that our structure is superior Also in case of using block node, we use less memory space as the number of pointers decreases.

빠른 프로세서 속도에 비해 메모리 접근(access)하는 시간이 상대적으로 느려짐에 따라, 대부분의 시스템은 격차를 줄이기 위하여 캐쉬(cache)라는 매우 타른 메모리를 사용하고 있으며 캐쉬 메모리를 얼마나 효과적으로 사용하는 가 하는 문제는 알고리즘의 성능에 있어서도 결정적인 영향을 미치게 된다. 블록을 사용하는 방법은 캐쉬의 효율성을 향상시키는 방법으로 잘 알려져 있으며 행렬곱셈이나 d-heap과 같은 탐색트리에 사용되어 좋은 결과를 내고 있다. 그러나 삽입과 삭제 연산시 트리의 회전(rotation)이 필요한 자료구조에서는 블록을 사용하면 블록사이에 데이터의 이동이 필요해서 실행시간이 증가하게 된다. 본 논문에서는 블록을 사용하는 pairing heap에서 개선된 삽입과 삭제 알고리즘을 제안하였고 실험을 통해 우수성을 입증하였다. 또 블록을 사용하는 경우 여러 개의 데이터를 한 블록에 저장하므로 포인터의 개수가 줄어들게 되어 메모리를 적게 사용하게 된다.

Keywords

References

  1. M. S. Lam and E. E. Rothberg. The Cache Performance and Optimizations of Blocked Algorithms. Conf on Architectural Support for Programming Languages and Operating Systems (ASPLOS IV), pages 63-74, 1991 https://doi.org/10.1145/106972.106981
  2. A. LaMarca and R. E. Ladner. The Influence of Caches on the Performance of Heaps. Journal of Experimental Algorithmics, Vol 1, Article 4, 1996
  3. A. Lamarca and R. E. Ladner. The Influence of Caches on the Performance of Sorting . In Proceedings of the Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 370-379, 1997
  4. R. E. Ladner, J. D. Fix and A. LaMarca. Cache Performance Analysis of Traversals and Random Accesses. In Proceedings of the Tenth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 613-622, 1999
  5. A. LaMarca. Caches and Algorithms. Ph. D. Dissertation, University of Washington, May 1996
  6. Trishul M. Chilimbi, Mark D. Hill and James R. Larus. Making Pointer-Based Data Structures Cache Conscious. IEEE Computer pp. 67-74, Dec. 2000 https://doi.org/10.1109/2.889095
  7. Eliss Horowitz, Sartaj Sahni, and Susan Anderson-Freed, Fundamental of Data Structure in C, Computer Science Press, 1993
  8. Fredman, M.L., and Sdegewick, R., Sleator, D.D., and Tarjan, R.E. The pairing heap: A new form of self-adjusting heap. Algorithmica 1 (Mar, 1986.) 111-129 https://doi.org/10.1007/BF01840439
  9. John T. Stasko and Jeffrey Scott Vitter. Pairing heaps: Experiments and Analysis. ACM (Mar 1987.) Volume 30 Number 3 https://doi.org/10.1145/214748.214759
  10. S. Cho and S. Sahni, 'Weighted Biased Leftist Trees and Modified Skip List', ACM Journal on Experimental Algorithmics, 1998 https://doi.org/10.1145/297096.297111