Hinted dictionaries: Efficient functional ordered sets and maps

Amir Shaikhha*, Mahdi Ghorbani*, Hesam Shahrokhi*

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

This paper 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 paper, 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 in comparison with the SciPy library for sparse vector operations.
Original languageEnglish
Title of host publication37th European Conference on Object-Oriented Programming (ECOOP 2023)
EditorsKarim Ali, Guido Salvaneschi
PublisherSchloss Dagstuhl - Leibniz-Zentrum für Informatik
Pages1-28
Number of pages28
Volume263
ISBN (Electronic)9783959772815
DOIs
Publication statusPublished - 11 Jul 2023
Event37th European Conference on Object-Oriented Programming - Seattle, United States
Duration: 17 Jul 202321 Jul 2023

Publication series

NameLeibniz International Proceedings in Informatics (LIPIcs)
ISSN (Print)1868-8969

Conference

Conference37th European Conference on Object-Oriented Programming
Abbreviated titleECOOP 2023
Country/TerritoryUnited States
CitySeattle
Period17/07/2321/07/23

Keywords / Materials (for Non-textual outputs)

  • functional collections
  • ordered dictionaries
  • sparse linear algebra

Fingerprint

Dive into the research topics of 'Hinted dictionaries: Efficient functional ordered sets and maps'. Together they form a unique fingerprint.

Cite this