SGI Standard Template Library

Overview

Silicon Graphics has made its implementation of the C++ Standard Template Library freely available to the public. The SGI Standard Template Library features thread safety, improved memory utilization, improved run-time efficiency, and new data structures, including hash tables; it also includes a comprehensive conceptual taxonomy of generic software components.

cite from SF BA Center for Advanced Technology  C++  ISG presentation

Visit SGI Standard Template Library User's Guide page to learn more about SGI STL. That excellent site contain full STL documentation, distribution to download and useful links.

Efficiency

These are major improvements that make SGI STL the most efficient:

  • Rich set of algorithm specializations. What everybody is looking for in generic library,  it's the generic interface, not the same code for every type instantiated. Utilizing  __type_traits technique, SGI STL optimizes copy(T*, T*, T* ) call for T being builtin type into a single memmove() call, and so on.
  • Node allocators. SGI STL implements allocator<T> as a wrapper over  thread-safe node allocator engine which is fine-tuned to handle allocation of relatively small chunks of memory very efficiently.

Thread safety

Please refer to SGI site for detailed document on thread safety. Basic points are:

  • simultaneous read access to the same container from within separate threads is safe;
  • simultaneous access to distinct containers (not shared between threads) is safe;
  • user must provide synchronization for all accesses if any thread may modify shared container.

Exception safety

SGI STL is exception-safe. STLport document on exception safety describes STL guarantees and client requirements.

Standard compliance

SGI STL is committed to close compliance to C++ Standard. With the latest release in Feb 99 and experimental effort continued through 2000, it incorporates the latest "word of the standard".

Reliability

SGI STL is being shipped with GNU C++ since 2.8.x.
That is enormous amount of installations which provide solid feedback to get bugs fixed.

Important extensions

SGI STL provides the following extensions compared to the C++ standard:

  • hashed containers: hash_set, hash_multiset, hash_map, hash_multimap.
  • single-linked lists - often very reasonable tradeoff.
  • ropes: alternative representation of strings which scale well to very large strings

Public distribution

SGI STL is being distributed free of charge and restrictions:

Copyright (c) 1994 Hewlett-Packard Company

Copyright (c) 1996,97 Silicon Graphics Computer Systems, Inc.

Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Hewlett-Packard Company makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.

Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Silicon Graphics makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.


Table of Contents


Copyright 2001 by STLport