Comparing the performance of concurrent hash tables implemented in Haskell

Abstract This paper presents seven concurrent hash table implementations in Haskell, ranging from low-level synchronization mechanisms to high-level ones such as transactional memories. The hash tables were compared using different initial sizes, load factors, data types and hash functions. We also present a case study on implementing a color palette algorithm using the hash tables. The result of the comparison between the algorithms shows that the implementation using the STM Haskell transactional memory library and fine-grain synchronization provides the best performance and good scalability, followed by the implementation using lock striping and MVars.

[1]  Simon L. Peyton Jones,et al.  Composable memory transactions , 2008, Commun. ACM.

[2]  Simon Marlow,et al.  Comparing the performance of concurrent linked-list implementations in Haskell , 2009, DAMP '09.

[3]  Simon L. Peyton Jones,et al.  Concurrent Haskell , 1996, POPL '96.

[4]  Simon L. Peyton Jones,et al.  Parallel generational-copying garbage collection with a block-structured heap , 2008, ISMM '08.

[5]  André L. M. Santos,et al.  Software transactional memory vs. locking in a functional language: a controlled experiment , 2011, SPLASH Workshops.

[6]  James R. Larus,et al.  Transactional Memory (Synthesis Lectures on Computer Architecture) , 2007 .

[7]  Simon Peyton Jones,et al.  Tackling the Awkward Squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell , 2005 .

[8]  Shan Liu,et al.  Palette Mode Coding in HEVC Screen Content Coding Extension , 2016, IEEE Journal on Emerging and Selected Topics in Circuits and Systems.

[9]  Bryan O'Sullivan,et al.  Real World Haskell , 2008 .

[10]  Maurice Herlihy,et al.  The art of multiprocessor programming , 2020, PODC '06.

[11]  Xin-She Yang,et al.  Introduction to Algorithms , 2021, Nature-Inspired Optimization Algorithms.

[12]  Simon L. Peyton Jones,et al.  Runtime support for multicore Haskell , 2009, ICFP.

[13]  Simon Marlow Parallel and Concurrent Programming in Haskell: Techniques for Multicore and Multithreaded Programming , 2013 .

[14]  Maurício L. Pilla,et al.  Concurrent Hash Tables for Haskell , 2016, SBLP.

[15]  Ryan Newton,et al.  Intel Concurrent Collections for Haskell , 2011 .

[16]  Adam Drozdek,et al.  Data structures and algorithms in C , 1995 .

[17]  Mateo Valero,et al.  unreadTVar: Extending Haskell Software Transactional Memory for Performance , 2007, Trends in Functional Programming.

[18]  Nir Shavit,et al.  Split-ordered lists: Lock-free extensible hash tables , 2006, JACM.