skip to main content
research-article

Comparing the performance of concurrent linked-list implementations in Haskell

Published:06 October 2009Publication History
Skip Abstract Section

Abstract

Haskell has a rich set of synchronization primitives for implementing shared-state concurrency abstractions, ranging from the very high level (Software Transactional Memory) to the very low level (mutable variables with atomic read-modify-write).

In this paper we perform a systematic comparison of these different concurrent programming models by using them to implement the same abstraction: a concurrent linked-list. Our results are somewhat surprising: there is a full two orders of magnitude difference in performance between the slowest and the fastest implementation. Our analysis of the performance results gives new insights into the relative performance of the programming models and their implementation.

Finally, we suggest the addition of a single primitive which in our experiments improves the performance of one of the STM-based implementations by more than a factor of 7.

References

  1. R. Bayer and M. Schkolnick. Concurrency of operations on b-trees. pages 129--139, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. H.-J. Boehm and S.V. Adve. Foundations of the c++ concurrency memory model. In Proc. of PLDI'08, pages 68--78. ACM Press, 2008. Google ScholarGoogle Scholar
  3. K. Fraser and T. Harris. Concurrent programming without locks. ACM Trans. Comput. Syst., 25(2):5, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Glasgow haskell compiler home page. http://www.haskell.org/ghc/.Google ScholarGoogle Scholar
  5. T. Harris, S. Marlow, S. Peyton Jones, and M. Herlihy. Composable memory transactions. In Proc. of PPoPP'05, pages 48--60. ACM Press, 2005. Google ScholarGoogle Scholar
  6. T.L. Harris. A pragmatic implementation of non-blocking linkedlists. In LNCS, volume 2180, pages 300--314. Springer-Verlag, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Herlihy and E. Koskinen. Transactional boosting: a methodology for highly-concurrent transactional objects. In Proc. of PPoPP'08, pages 207--216. ACM Press, 2008. Google ScholarGoogle Scholar
  8. J. Manson, W. Pugh, and S.V. Adve. The Java memory model. In Proc. of POPL'05, pages 378--391. ACM Press, 2005. Google ScholarGoogle Scholar
  9. S. Marlow, S.L. Peyton Jones, A. Moran, and J. Reppy. Asynchronous exceptions in Haskell. In ACM Conference on Programming Languages Design and Implementation (PLDI'01), pages 274--285, Snowbird, Utah, June 2001. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. Perfumo, N. Sönmez, S. Stipic, O.S. Unsal, A. Cristal, T. Harris, and M. Valero. The limits of software transactional memory (stm): dissecting haskell stm applications on a many-core environment. In Proc. of 5th Conference on Computing Frontiers, pages 67--78. ACM Press, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. S. Peyton Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, 2003.Google ScholarGoogle Scholar
  12. S. Peyton Jones, A. Gordon, and S. Finne. Concurrent Haskell. In Proc. of POPL'96, pages 295--308. ACM Press, 1996. Google ScholarGoogle Scholar
  13. N. Sonmez, C. Perfumo, S. Stipic, A. Cristal, O.S. Unsal, and M. Valero. unreadTVar: Extending haskell software transactional memory for performance. In Proc. of Eighth Symposium on Trends in Functional Programming (TFP 2007), 2007.Google ScholarGoogle Scholar

Index Terms

  1. Comparing the performance of concurrent linked-list implementations in Haskell

      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 SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 44, Issue 5
        May 2009
        19 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1629635
        Issue’s Table of Contents

        Copyright © 2009 Authors

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 6 October 2009

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!