Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.5555/1788888.1788900guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Broadword implementation of rank/select queries

Published: 30 May 2008 Publication History

Abstract

Research on succinct data structures (data structures occupying space close to the information-theoretical lower bound, but achieving speed similar to their standard counterparts) has steadily increased in the last few years. However, many theoretical constructions providing asymptotically optimal bounds are unusable in practise because of the very large constants involved. The study of practical implementations of the basic building blocks of such data structures is thus fundamental to obtain practical applications. In this paper we argue that 64-bit and wider architectures are particularly suited to very efficient implementations of rank (counting the number of ones up to a given position) and select (finding the position of the i -th bit set), two essential building blocks of all succinct data structures. Contrarily to typical 32-bit approaches, involving precomputed tables, we use pervasively broadword (a.k.a. SWAR--"SIMD in A Register") programming, which compensates the constant burden associated to succinct structures by solving problems in parallel in a register. We provide an implementation named rank9 that addresses 264 bits, consumes less space and is significantly faster then current state-of-the-art 32-bit implementations, and a companion select9 structure that selects in nearly constant time using only access to aligned data. For sparsely populated arrays, we provide a simple broadword implementation of the Elias-Fano representation of monotone sequences. In doing so, we develop broadword algorithms for performing selection in a word or in a sequence of words that are of independent interest.

References

[1]
Jacobson, G.: Space-efficient static trees and graphs. In: 30th Annual Symposium on Foundations of Computer Science, Research Triangle Park, North Carolina, pp. 549-554. IEEE, Los Alamitos (1989)
[2]
Golynski, A.: Optimal lower bounds for rank and select indexes. In: Bugliesi, M., Preneel, B., Sassone, V., Wegener, I. (eds.) ICALP 2006. LNCS, vol. 4051, pp. 370-381. Springer, Heidelberg (2006)
[3]
Gonzàlez, R., Grabowski, S., Mäkinen, V., Navarro, G.: Practical implementation of rank and select queries. In: Poster Proceedings Volume of 4thWorkshop on Efficient and Experimental Algorithms (WEA 2005), pp. 27-38. CTI Press, Ellinika Grammata (2005)
[4]
Knuth, D.E.: The Art of Computer Programming. Pre-Fascicle 1A. Draft of Section 7.1.3: Bitwise Tricks and Techniques (2007)
[5]
Fisher, R.J., Dietz, H.G.: Compiling for SIMD within a register. In: Carter, L., Ferrante, J., Sehr, D., Chatterjee, S., Prins, J.F., Li, Z., Yew, P.-C. (eds.) LCPC 1998. LNCS, vol. 1656, pp. 290-304. Springer, Heidelberg (1999)
[6]
Lamport, L.:Multiple byte processing with full-word instructions. Comm. ACM18(8), 471- 475 (1975)
[7]
Fredman, M.L., Willard, D.E.: Surpassing the information theoretic bound with fusion trees. J. Comput. System Sci. 47(3), 424-436 (1993)
[8]
Geary, R.F., Rahman, N., Raman, R., Raman, V.: A simple optimal representation for balanced parentheses. In: Sahinalp, S.C., Muthukrishnan, S.M., Dogrusoz, U. (eds.) CPM 2004. LNCS, vol. 3109, pp. 159-172. Springer, Heidelberg (2004)
[9]
Dijkstra, E.W.:Why numbering should start at zero. EWD, p. 831 (1982)
[10]
Okanohara, D., Sadakane, K.: Practical entropy-compressed rank/select dictionary. In: Proc. of the Workshop on Algorithm Engineering and Experiments, ALENEX 2007, SIAM, Philadelphia (2007)
[11]
Elias, P.: Efficient storage and retrieval by content and address of static files. J. Assoc. Comput. Mach. 21(2), 246-260 (1974)
[12]
Fano, R.M.: On the number of bits required to implement an associative memory. In: Memorandum 61, Computer Structures Group, Project MAC, MIT, Cambridge, Mass., n.d (1971)
[13]
Kim, D.K., Na, J.C., Kim, J.E., Park, K.: Efficient implementation of rank and select functions for succinct representation. In: Nikoletseas, S.E. (ed.) WEA 2005. LNCS, vol. 3503, pp. 315-327. Springer, Heidelberg (2005)
[14]
Clark, D.R.: Compact Pat Trees. PhD thesis, University of Waterloo, Waterloo, Ont., Canada (1998)
[15]
Delpratt, O., Rahman, N., Raman, R.: Compressed prefix sums. In: van Leeuwen, J., Italiano, G.F., van der Hoek, W., Meinel, C., Sack, H., Plášil, F. (eds.) SOFSEM 2007. LNCS, vol. 4362, pp. 235-247. Springer, Heidelberg (2007)

Cited By

View all
  • (2020)Succinct Trit-array Trie for Scalable Trajectory Similarity SearchProceedings of the 28th International Conference on Advances in Geographic Information Systems10.1145/3397536.3422210(518-529)Online publication date: 3-Nov-2020
  • (2020)Succinct Range FiltersACM Transactions on Database Systems10.1145/337566045:2(1-31)Online publication date: 21-Jun-2020
  • (2018)Log(graph)Proceedings of the 27th International Conference on Parallel Architectures and Compilation Techniques10.1145/3243176.3243198(1-13)Online publication date: 1-Nov-2018
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
WEA'08: Proceedings of the 7th international conference on Experimental algorithms
May 2008
362 pages
ISBN:3540685480
  • Editor:
  • Catherine C. McGeoch

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 30 May 2008

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 03 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2020)Succinct Trit-array Trie for Scalable Trajectory Similarity SearchProceedings of the 28th International Conference on Advances in Geographic Information Systems10.1145/3397536.3422210(518-529)Online publication date: 3-Nov-2020
  • (2020)Succinct Range FiltersACM Transactions on Database Systems10.1145/337566045:2(1-31)Online publication date: 21-Jun-2020
  • (2018)Log(graph)Proceedings of the 27th International Conference on Parallel Architectures and Compilation Techniques10.1145/3243176.3243198(1-13)Online publication date: 1-Nov-2018
  • (2018)SuRFProceedings of the 2018 International Conference on Management of Data10.1145/3183713.3196931(323-336)Online publication date: 27-May-2018
  • (2018)Lempel---Ziv-78 Compressed String DictionariesAlgorithmica10.1007/s00453-017-0348-780:7(2012-2047)Online publication date: 1-Jul-2018
  • (2017)Practical Compact Indexes for Top-k Document RetrievalACM Journal of Experimental Algorithmics10.1145/304395822(1-37)Online publication date: 2-Mar-2017
  • (2017)Improved Search of Large Transcriptomic Sequencing Databases Using Split Sequence Bloom Trees21st Annual International Conference on Research in Computational Molecular Biology - Volume 1022910.1007/978-3-319-56970-3_16(257-271)Online publication date: 3-May-2017
  • (2015)Fast Compressed Tries through Path DecompositionsACM Journal of Experimental Algorithmics10.1145/265633219(1.1-1.20)Online publication date: 7-Jan-2015
  • (2015)The wavelet matrixInformation Systems10.1016/j.is.2014.06.00247:C(15-32)Online publication date: 1-Jan-2015
  • (2015)Filtration Algorithms for Approximate Order-Preserving MatchingProceedings of the 22nd International Symposium on String Processing and Information Retrieval - Volume 930910.1007/978-3-319-23826-5_18(177-187)Online publication date: 1-Sep-2015
  • Show More Cited By

View Options

View options

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media