Advertisement

Comparing Integer Data Structures for 32 and 64 Bit Keys

  • Nicholas Nash
  • David Gregg
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5038)

Abstract

In this paper we experimentally compare a number of data structures operating over keys that are 32 and 64-bit integers. We examine traditional comparison-based search trees as well as data structures that take advantage of the fact that the keys are integers, such as van Emde Boas trees and various trie-based data structures. We propose a variant of a burst trie that performs better in both time and space than all the alternative data structures. Burst tries have previously been shown to provide a very efficient base for implementing cache efficient string sorting algorithms. We find that with suitable engineering they also perform excellently as a dynamic ordered data structure operating over integer keys. We provide experimental results when the data structures operate over uniform random data. We also provide a motivating example for our study in Valgrind, a widely used suite of tools for the dynamic binary instrumentation of programs, and present experimental results over data sets derived from Valgrind.

Keywords

Binary Search Tree Trie Node Burst Trie Branch Mispredictions Dynamic Binary Instrumentation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Acharya, A., Zhu, H., Shen, K.: Adaptive algorithms for cache-efficient trie search. In: Goodrich, M.T., McGeoch, C.C. (eds.) ALENEX 1999. LNCS, vol. 1619, pp. 296–311. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  2. 2.
    Bayer, R., McCreight, E.M.: Organization and maintenance of large ordered indices. Acta Inf. 1, 173–189 (1972)CrossRefGoogle Scholar
  3. 3.
    Brent, R.P.: Note on marsaglia’s xorshift random number generators. Journal of Statistical Software 11(5), 1–4 (2004)Google Scholar
  4. 4.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn., pp. 273–301. MIT Press, Cambridge, MA, USA (2001)zbMATHGoogle Scholar
  5. 5.
    Dementiev, R., Kettner, L., Mehnert, J., Sanders, P.: Engineering a sorted list data structure for 32 bit keys. In: Proc. of the Sixth SIAM Workshop on Algorithm Engineering and Experiments, New Orleans, LA, USA, pp. 142–151 (2004)Google Scholar
  6. 6.
    Dongarra, J., London, K., Moore, S., Mucci, P., Terpstra, D., You, H., Zhou, M.: Experiences and lessons learned with a portable interface to hardware performance counters. In: IPDPS 2003: Proc. of the 17th International Symposium on Parallel and Distributed Processing, Washington, DC, USA, p. 289.2. IEEE Computer Society, Los Alamitos (2003)Google Scholar
  7. 7.
    Heinz, S., Zobel, J., Williams, H.E.: Burst tries: a fast, efficient data structure for string keys. ACM Trans. Inf. Syst. 20(2), 192–223 (2002)CrossRefGoogle Scholar
  8. 8.
    Knessl, C., Szpankowski, W.: Heights in generalized tries and patricia tries. In: Gonnet, G.H., Viola, A. (eds.) LATIN 2000. LNCS, vol. 1776, pp. 298–307. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  9. 9.
    Knessl, C., Szpankowski, W.: A note on the asymptotic behavior of the heights in b-tries for b large. Electr. J. Comb. 7 (2000)Google Scholar
  10. 10.
    Knuth, D.E.: The Art Of Computer Programming. Sorting And Searching, 2nd edn., vol. 3, pp. 458–478, 482–491, 506. Addison Wesley Longman Publishing Co., Inc., Redwood City, CA, USA (1998)Google Scholar
  11. 11.
    Korda, M., Raman, R.: An experimental evaluation of hybrid data structures for searching. In: Proc. of the 3rd International Workshop on Algorithm Engineering (WAE), London, UK, pp. 213–227 (1999)Google Scholar
  12. 12.
    Nethercote, N., Seward, J.: Valgrind: A framework for heavyweight dynamic binary instrumentation. SIGPLAN Not. 42(6), 89–100 (2007)CrossRefGoogle Scholar
  13. 13.
    Nilsson, S., Tikkanen, M.: An experimental study of compression methods for dynamic tries. Algorithmica 33(1), 19–33 (2002)zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Sinha, R.: Using compact tries for cache-efficient sorting of integers. In: Ribeiro, C.C., Martins, S.L. (eds.) WEA 2004. LNCS, vol. 3059, pp. 513–528. Springer, Heidelberg (2004)Google Scholar
  15. 15.
    Sinha, R., Ring, D., Zobel, J.: Cache-efficient string sorting using copying. J. Exp. Algorithmics 11, 1.2 (2006)Google Scholar
  16. 16.
    Sinha, R., Zobel, J.: Cache-conscious sorting of large sets of strings with dynamic tries. J. Exp. Algorithmics 9, 1.5 (2004)Google Scholar
  17. 17.
    Sinha, R., Zobel, J.: Using random sampling to build approximate tries for efficient string sorting. J. Exp. Algorithmics 10, 2.10 (2005)Google Scholar
  18. 18.
    Sleator, D.D., Tarjan, R.E.: Self-adjusting binary search trees. J. ACM 32(3), 652–686 (1985)zbMATHCrossRefMathSciNetGoogle Scholar
  19. 19.
    Stroustrup, B.: The C++ Programming Language, 3rd edn. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA (1997)Google Scholar
  20. 20.
    Sussenguth, E.H.: Use of tree structures for processing files. Commun. ACM 6(5), 272–279 (1963)CrossRefGoogle Scholar
  21. 21.
    van Emde Boas, P.: Preserving order in a forest in less than logarithmic time and linear space. Inf. Process. Lett. 6(3), 80–82 (1977)zbMATHCrossRefGoogle Scholar
  22. 22.
    Willard, D.E.: New trie data structures which support very fast search operations. J. Comput. Syst. Sci. 28(3), 379–394 (1984)zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • Nicholas Nash
    • 1
  • David Gregg
    • 1
  1. 1.Dept. of Computer ScienceTrinity CollegeDublinIreland

Personalised recommendations