Towards Efficient Hash Maps in Functional Array Languages
William Henrich Due, Martin Elsman, Troels Henriksen

TL;DR
This paper introduces a systematic, functional approach to implementing efficient, collision-free hash maps in a data-parallel language, demonstrating superior GPU performance over traditional methods and discussing potential language extensions.
Contribution
It presents a novel, functional derivation of static hash maps suitable for GPU execution, addressing dynamic key sizing and outperforming conventional data structures.
Findings
Hash maps outperform tree/search-based approaches.
Implementation is faster than cuCollections for construction.
Performance is influenced by compiler limitations and language constructs.
Abstract
We present a systematic derivation of a data-parallel implementation of two-level, static and collision-free hash maps, by giving a functional formulation of the Fredman et al. construction, and then flattening it. We discuss the challenges of providing a flexible, polymorphic, and abstract interface to hash maps in a functional array language, with particular attention paid to the problem of dynamically sized keys, which we address by associating each hash map with an arbitrary context. The algorithm is implemented in Futhark, and the achieved GPU execution performance is compared on simple benchmark problems. We find that our hash maps outperform conventional tree/search-based approaches. Furthermore, our implementation is compared against the state-of-the-art cuCollections library, which is significantly faster for hash map construction, and to a lesser degree for lookups. We explain…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
