Thursday, November 22, 2007

Why Bother with STLPort in Visual Studio?

Why would someone bother going through the hassle of setting up STLPort to use quite basic use of the language (if you consider STL as part of the basic of using C++). Why not just use the one already built-in in Visual Studio?. Well, two things : Standard-Compatibility and Efficiency (speed and memory wise).

It was from the early years I do C++ in production setting, me and a friends decided to use STL full-time i.e: use all feature it has to offer that is relevant and makes sense to the work at hand. It was not long until we stumble upon STLPort. We do some test and it didn't take a while to convince us. We didn't need to go far in testing, even for quite typical operation e.g: doing some heavy processing using for_each on vector already show very visible difference. Also, many said that it's more standard compatible, so the tought of using less compatible implementation when the more compatible one already exist makes us uneasy. The switch was decided and we never look back.

Of course, using STLPort means more work, but it's certainly worth it, especially if you'd like to see your code with STL run as "advertised" in the book.

No comments: