Hinted Dictionaries: Efficient Functional Ordered Sets and Maps
Amir Shaikhha, Mahdi Ghorbani, Hesam Shahrokhi

TL;DR
This paper introduces hinted dictionaries, a new type of ordered set and map data structure that uses hints to improve performance, unifying imperative and functional interfaces with various underlying representations.
Contribution
The paper presents hinted dictionaries, a novel data structure that enhances efficiency of ordered sets and maps by leveraging hints, applicable across multiple underlying implementations.
Findings
Superior performance in set-set operations compared to C++ standard library
Competitive performance in sparse vector operations with SciPy
Effective unification of imperative and functional dictionary interfaces
Abstract
This article introduces hinted dictionaries for expressing efficient ordered sets and maps functionally. As opposed to the traditional ordered dictionaries with logarithmic operations, hinted dictionaries can achieve better performance by using cursor-like objects referred to as hints. Hinted dictionaries unify the interfaces of imperative ordered dictionaries (e.g., C++ maps) and functional ones (e.g., Adams' sets). We show that such dictionaries can use sorted arrays, unbalanced trees, and balanced trees as their underlying representations. Throughout the article, we use Scala to present the different components of hinted dictionaries. We also provide a C++ implementation to evaluate the effectiveness of hinted dictionaries. Hinted dictionaries provide superior performance for set-set operations in comparison with the standard library of C++. Also, they show a competitive performance…
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.
