Lists Revisited: Cache Conscious STL Lists

  • Leonor Frias
  • Jordi Petit
  • Salvador Roura
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4007)


We present three cache conscious implementations of STL standard compliant lists. Up to now, one could either find simple double linked list implementations that easily cope with standard strict requirements, or theoretical approaches that do not take into account any of these requirements in their design. In contrast, we have merged both approaches, paying special attention to iterators constraints. In this paper, we show the competitiveness of our implementations with an extensive experimental analysis. This shows, for instance, 5-10 times faster traversals and 3-5 times faster internal sort.


Cache Line List Size Standard Library Standard Template Library Memory Allocator 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    International Standard ISO/IEC 14882: Programming languages — C++. 1st edn. American National Standard Institute (1998)Google Scholar
  2. 2.
    Cormen, T.H., Leiserson, C., Rivest, R., Stein, C.: Introduction to algorithms, 2nd edn. The MIT Press, Cambridge (2001)zbMATHGoogle Scholar
  3. 3.
    Lamarca, A.: Caches and algorithms. PhD thesis, University of Washington (1996)Google Scholar
  4. 4.
    Sen, S., Chatterjee, S.: Towards a theory of cache-efficient algorithms. In: SODA 2000, pp. 829–838. SIAM, Philadelphia (2000)Google Scholar
  5. 5.
    Demaine, E.: Cache-oblivious algorithms and data structures. In: EEF Summer School on Massive Data Sets. LNCS (2002)Google Scholar
  6. 6.
    Frigo, M., Leiserson, C., Prokop, H., Ramachandran, S.: Cache-oblivious algorithms. In: FOCS 1999, p. 285. IEEE Computer Society, Los Alamitos (1999)Google Scholar
  7. 7.
    Mehlhorn, K., Naher, S.: LEDA — A platform for combinatorial and geometric computing. Cambridge University Press, Cambridge (1999)zbMATHGoogle Scholar
  8. 8.
    Josuttis, N.: The C++ Standard Library: A Tutorial and Reference. Addison-Wesley, Reading (1999)Google Scholar
  9. 9.
    Bender, M., Cole, R., Demaine, E., Farach-Colton, M.: Scanning and traversing: Maintaining data for traversals in memory hierarchy. In: Möhring, R.H., Raman, R. (eds.) ESA 2002. LNCS, vol. 2461, pp. 152–164. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  10. 10.
    Luk, C., Cohn, R., Muth, R., Patil, H., Klauser, A., Lowney, G., Wallace, S., Reddi, V.J., Hazelwood, K.: Pin: Building customized program analysis tools with dynamic instrumentation. In: PLDI 2005, Chicago, IL (jun 2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Leonor Frias
    • 1
  • Jordi Petit
    • 1
  • Salvador Roura
    • 1
  1. 1.Departament de Llenguatges i Sistemes InformàticsUniversitat Politècnica de CatalunyaBarcelonaSpain

Personalised recommendations