Skip to main content

Speeding up STL Set/Map Usage in C++ Applications

  • Conference paper
Performance Evaluation: Metrics, Models and Benchmarks (SIPEW 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5119))

Included in the following conference series:

Abstract

In this work we augment the red-black tree implementation of STL set< ... >/map< ... > with a doubly linked list that is in sorted order. This is done for the purpose of speeding up C++ applications that use set< >/map< >::iterator considerably. In such cases, the doubly linked list helps in iterating over the set< >/map< > quickly. Usually the ++/– operations have an amortized cost of O(1) for a red-black tree implementation. The linked list augmentation helps in improving the ++/– operations to Θ(1). In addition, our experiments for IBM’s P5+ and P6 processors show that this mechanism improves performance for two SPEC CPU2006 benchmarks and there is no adverse cache effect when we support two additional pointers per node of a red-black tree.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 74.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 99.00
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Meyers, S.: Effective STL. Addison Wesley Professional Computing Series (2001)

    Google Scholar 

  2. Bronimann, H., Katajainen, J.: Efficiency of Various Forms of Red-Black Trees. CPH STL Report 2006-2, University of Copenhagen (2006)

    Google Scholar 

  3. Hansen, J.G., Henriksen, A.K.: The Multi map/set of the Copenhagen STL. CPH STL Report 2001-6, University of Copenhagen (2001)

    Google Scholar 

  4. Lynge, S.: Implementing the AVL Trees for the CPH STL. CPH STL Report 2004-1, University of Copenhagen (2004)

    Google Scholar 

  5. Cormen, H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms. Prentice- Hall, India (2006)

    Google Scholar 

  6. SPEC CPU 2006 benchmarks, http://www.spec.org

  7. Stepanov, A., Lee, M.: The Standard Template Library, Technical Report HPL-95-11, Hewlett Packard (1995)

    Google Scholar 

  8. ISO/IEC 14882:1998 and ISO/IEC 14882:2003(E) Standard for the C++ Programming Language

    Google Scholar 

  9. pmcount, http://www-128.ibm.com/developerworks/power/library/pa-cpipower2/

  10. IBM XL Compilers and White Papers, http://www.ibm.com/software/awdtools/ccompilers http://www1.ibm.com/support/docview.wss?rs=32&context=SSEP5D&uid=swg27007322 http://www-1.ibm.com/support/docview.wss?rs=43&context=SSEP9Q&uid=swg27005175

Download references

Author information

Authors and Affiliations

Authors

Editor information

Samuel Kounev Ian Gorton Kai Sachs

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Das, D., Valluri, M., Wong, M., Cambly, C. (2008). Speeding up STL Set/Map Usage in C++ Applications. In: Kounev, S., Gorton, I., Sachs, K. (eds) Performance Evaluation: Metrics, Models and Benchmarks. SIPEW 2008. Lecture Notes in Computer Science, vol 5119. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69814-2_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-69814-2_20

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-69813-5

  • Online ISBN: 978-3-540-69814-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics