The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Best STL implementation

Have anybody seen some detailed comparison/benchmarking of STL implementations? I have tried googling for it, but I have not been able to find any.

I am currently using the one included with Visual C++ 6.0. It has quite a few bugs and performance problems, but at least they are well known.

I have heard that the STL implementation should have improved a lot in later versions of VC++ and there are also several commercial implementation and the free StlPort. So I would like some base of comparison before deciding which implementation to upgrade to.
STL laggerd
Thursday, December 15, 2005
Are you sticking with VC++ 6? If so, you're limited by the broken template support.

At the very least, go to Dinkumware's site and get the fixes he posted there for the library that shipped with VC 6.

With VC 6, I've used the built-in, STLPort, and the Dinkumware library. Both STLPort and Dinkumware blew the pants off the built-in version, both in performance, and in correctness (the built in one leaks memory in several spots).

I preferred STLPort because I could actually read the code; at the time we went with Dinkumware because of the availability of support. STLPort apparently does have tech support available now.

But whatever you do, don't stick with the supplied lib. It sucks.
Chris Tavares Send private email
Thursday, December 15, 2005
I think you're out of luck if you're looking for a general benchmark.  The STL is huge, and given that it's templated, infinitely flexible.  The chances that any benchmark is going to be close to your operating conditions are zero.  e.g.: Newer implementations may have things like small string optimizations (SSO) that can improve performance - but only if you have small strings.
If you think the STL that ships with VS6 is crappy then measure, swap it out, and measure.  It's the only way you're going to know if it's going to help you.
a unique name lets you know it's me Send private email
Thursday, December 15, 2005
+1 for Chris above.
Chris in Edmonton Send private email
Thursday, December 15, 2005
I use STLPort when I can and encourage clients to upgrade the VC6 headers from the dinkumware site when I can't. I havent felt the need to try any other STL implementations because STLPort 'just works'.
Len Holgate Send private email
Friday, December 16, 2005
There has not been a new StlPort release for over a year. Are you guys using the old stable release or are you getting the latest (beta) version from cvs?
STL laggerd
Friday, December 16, 2005
+1 for STLPort.  All STL implementations are open (preprocessor, header files).  But STLPort is well documented and attributed, and has a good long history.

Incidentally if you're poking around STL libraries, don't miss the excellent boost libraries ( which fill in some gaps.
Duncan Werner Send private email
Friday, December 16, 2005
STLport also has modes that make it slower, but enforce correct usage (e.g., it catches uses of vector iterators after a push_back() operation, which though illegal work 95% of the time in 99% of the implementations. The last 5%, usually heisenbugs, are probably in your QA database..)
Ori Berger Send private email
Sunday, December 18, 2005

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz