An implementation of composable memory transactions in Haskell
SC'11 Proceedings of the 10th international conference on Software composition
Thread-Safe priority queues in haskell based on skiplists
TFP'11 Proceedings of the 12th international conference on Trends in Functional Programming
Hi-index | 0.00 |
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-modifywrite). 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.