寻找最快的并发并查找算法
In Search of the Fastest Concurrent Union-Find Algorithm
摘要:
并集问题是计算机科学中的基本问题之一,在序列情况下,人们从理论和实践两个角度对它进行了深入的研究。最近,有越来越多的兴趣在分析这个问题的并发情况下,已经提出了一些渐近有效的算法。然而,到目前为止,很少有人知道并发的Union-Find的实际性能。这项工作解决了这一差距。我们评估和分析了多种并发Union-Find算法和优化策略的性能,这些算法和策略适用于各种平台(Intel、AMD和ARM)和工作负载(社交、随机和道路网络,以及集成到更复杂的算法中)。我们首先观察到,由于有限的计算成本,诱导缓存未命中的数量是现有算法的性能的关键决定因素。我们引入新的技术,以减少这种成本,通过存储节点的优先级隐式和使用普通的读取和写入的方式,不影响算法的正确性。最后,我们表明,联合查找实现是一个有趣的应用程序transmittance内存(TM):我们发现的最快的算法变体之一是一个顺序的,使用粗粒度锁定与锁省略优化,以减少同步成本,提高可扩展性。
英文摘要:
Union-Find (or Disjoint-Set Union) is one of the fundamental problems in computer science; it has been well-studied from both theoretical and practical perspectives in the sequential case. Recently, there has been mounting interest in analyzing this problem in the concurrent scenario, and several asymptotically-efficient algorithms have been proposed. Yet, to date, there is very little known about the practical performance of concurrent Union-Find. This work addresses this gap. We evaluate and analyze the performance of several concurrent Union-Find algorithms and optimization strategies across a wide range of platforms (Intel, AMD, and ARM) and workloads (social, random, and road networks, as well as integrations into more complex algorithms). We first observe that, due to the limited computational cost, the number of induced cache misses is the critical determining factor for the performance of existing algorithms. We introduce new techniques to reduce this cost by storing node priorities implicitly and by using plain reads and writes in a way that does not affect the correctness of the algorithms. Finally, we show that Union-Find implementations are an interesting application for Transactional Memory (TM): one of the fastest algorithm variants we discovered is a sequential one that uses coarse-grained locking with the lock elision optimization to reduce synchronization cost and increase scalability.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。