Redesigning the string hash table, burst trie, and BST to exploit cache

  • Authors:
  • Nikolas Askitis;Justin Zobel

  • Affiliations:
  • RMIT University, Melbourne, Australia;NICTA, University of Melbourne, Australia

  • Venue:
  • Journal of Experimental Algorithmics (JEA)
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

A key decision when developing in-memory computing applications is choice of a mechanism to store and retrieve strings. The most efficient current data structures for this task are the hash table with move-to-front chains and the burst trie, both of which use linked lists as a substructure, and variants of binary search tree. These data structures are computationally efficient, but typical implementations use large numbers of nodes and pointers to manage strings, which is not efficient in use of cache. In this article, we explore two alternatives to the standard representation: the simple expedient of including the string in its node, and, for linked lists, the more drastic step of replacing each list of nodes by a contiguous array of characters. Our experiments show that, for large sets of strings, the improvement is dramatic. For hashing, in the best case the total space overhead is reduced to less than 1 bit per string. For the burst trie, over 300MB of strings can be stored in a total of under 200MB of memory with significantly improved search time. These results, on a variety of data sets, show that cache-friendly variants of fundamental data structures can yield remarkable gains in performance.