skip to main content
article

A blocked all-pairs shortest-paths algorithm

Authors Info & Claims
Published:31 December 2003Publication History
Skip Abstract Section

Abstract

We propose a blocked version of Floyd's all-pairs shortest-paths algorithm. The blocked algorithm makes better utilization of cache than does Floyd's original algorithm. Experiments indicate that the blocked algorithm delivers a speedup (relative to the unblocked Floyd's algorithm) between 1.6 and 1.9 on a Sun Ultra Enterprise 4000/5000 for graphs that have between 480 and 3200 vertices. The measured speedup on an SGI O2 for graphs with between 240 and 1200 vertices is between 1.6 and 2.

Skip Supplemental Material Section

Supplemental Material

References

  1. {1} W. AbuSufah, D. J. Kuck, and D. H. Lawrie. Automatic program transformation for virtual memory computers. In Proc. of the 1979 National Computer Conference, 969-974, New York, 1979.Google ScholarGoogle Scholar
  2. {2} A. Aggarwal, K. Chandra, and M. Snir. A model for hierarchical memory. In The 19th Annual ACM Symposium on Theory of Computing, 305-314, New York, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. {3} A. Aggarwal, K. Chandra, and M. Snir. Hierarchical memory with block transfer. In The 28th Annual IEEE Symposium on Foundations of Computer Science, 204-216, Los Angeles, CA, 1987.Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. {4} A. Aggarwal, M. Horowitz, and Hennessey. An analytical cache model. The ACM Transactions on Computer Systems, 7(2):184-215, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. {5} B. Alpern, L. Carter, E. Feig, and T. Selker. The uniform memory hierarchy model of computation. Algorithmica, 12(2-3):72-109, 1994.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. {6} D. Callahan, S. Carr, and K. Kennedy. Improving register allocation for subscripted variables. In Proceedings of the ACM SIGPLAN '90 Conference on Programming Language Design and Implementation, White Plains, New York, 53-65, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. {7} N. Eiron, M. Rodeh, and I. Steinwarts. Matrix multiplication: a case study of enhanced data cache utilization. ACM JEA, 4, Article 3, 1999. Google ScholarGoogle Scholar
  8. {8} D. Gannon and W. Jalby. The influence of memory hierarchy on algorithm organization: Programming FFTs on a vector multiprocessor. In The Characteristics of Parallel Algorithms, MIT Press, Cambridge, 1987.Google ScholarGoogle Scholar
  9. {9} G. H. Golub and C. F. Van Loan. Matrix Computations. Johns Hopkins University Press, Baltimore, 1989.Google ScholarGoogle Scholar
  10. {10} E. Horowitz, S. Sahni, and S. Rajasekaran. Computer Algorithms. Computer Science Press, New York, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. {11} M. S. Lam, E. E. Rothberg, and M. E. Wolf. The cache performance and optimizations of blocked algorithms. ACM, 26:63-74, 1991.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. {12} A. LaMarca and R. E. Ladner. The influences of caches on the performance of heaps. The ACM Journal of Experimental Algorithms, 1(4), 1996. Google ScholarGoogle Scholar
  13. {13} A. LaMarca and R. E. Ladner. The influences of caches on the performance of sorting. Journal of Algorithms, 31, 66-104, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. {14} R. Ladner, J. Fix, and A. LaMarca. The cache performance analysis of traversals and random accesses. In The ACM-SIAM Symposium on Discrete Algorithms, 613-622, 1999. Google ScholarGoogle Scholar
  15. {15} M. Martonosi, A. Gupta, and T. Anderson. Memspy: analyzing memory system bottlenecks in programs. In Proceedings of the 1992 ACM SIGMETRICS Conference on Measurement and Modeling of Computer Systems, 1-12, Newport, Rhode Island, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. {16} A. C. McKeller and E. G. Coffman. The organization of matrices and matrix operations in a paged multiprogramming environment. CACM, 12(3):153-165, 1969. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. {17} D. Patterson and J. L. Hennessy. Computer Architecture: A Quantitative Analysis. Morgan Kaufmann, San Mateo, CA, 1996. Google ScholarGoogle Scholar
  18. {18} N. Rahman and R. Raman. Analysing cache effects in distribution sorting. ACM JEA, 5, Article 14, 2000. Google ScholarGoogle Scholar
  19. {19} J. P. Singh, H. S. Stone, and D. F. Thiebaut. A model of workloads and its use in miss-rate prediction for fully associative caches. IEEE Transactions on Computers, 41(7):811-825, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. {20} Sun Microsystems. Introduction to Shade. Manual, Sun Microsystems, Mountain View, CA, 1998.Google ScholarGoogle Scholar
  21. {21} O. Temam, C. Fricker, and W. Jalby. Cache interference phenomena. In Proceedings of the 1994 ACM SIGMETRICS: Conference on Measurement and Modelling of Computer Systems, 261-271, Nashville, Tennessee, 1994. Google ScholarGoogle ScholarCross RefCross Ref
  22. {22} O. Temam, C. Fricker, and W. Jalby. Influence of cross-interference on blocked loops: A case study with matrix-vector multiply. The ACM Transactions on Programming Languages and Systems, 17(4):561-575, 1994. Google ScholarGoogle Scholar
  23. {23} H. Wen and J. L. Baer. Efficient trace driven simulation methods for cache performance analysis. The ACM Transactions on Computer Systems, 9(3):222-241, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. {24} M. E. Wolf and M. S. Lam. A data locality optimizing. In Proceedings of the SIGPLAN '91 Conference on Programming Language Design and Implementation, 30-44, Toronto, Ontario, Canada, 1991. Google ScholarGoogle Scholar
  25. {25} L. Xiao, X. Zhang, and S. Kubricht. Improving memory performance of sorting algorithms, ACM JEA, 5, Article 3, 2000. Google ScholarGoogle Scholar

Index Terms

  1. A blocked all-pairs shortest-paths algorithm

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM Journal of Experimental Algorithmics
        ACM Journal of Experimental Algorithmics  Volume 8, Issue
        2003
        135 pages
        ISSN:1084-6654
        EISSN:1084-6654
        DOI:10.1145/996546
        Issue’s Table of Contents

        Copyright © 2003 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 31 December 2003
        Published in jea Volume 8, Issue

        Qualifiers

        • article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader