Differences between the various STL options on Solaris

Steve Clamage has provided a nice summary of the trade-offs between the various STL options. I'll summarise it here:

  • Default STL. Available as part of the OS so does not require a separate library to be shipped with the application. However, does not support the standard.
  • -library=stlport4 Much better conformance with the standard, but no internationalisation. Must be distributed with applications that use it.
  • -library=stdcxx4 (Apache). Complete implementation of standard. Available on S10U10 and onwards.

I'd also add that stlport4 and stdcxx4 typically have much better performance than the default library.

The other point that bears repetition is that you can only include one STL per application. So you cannot use different implementations for different libraries or for the application.

Comments:

Do you get the -library=stdcxx4 (Apache) compliant library if you upgrade a U9 machine using the U10 patchset, or do you need to do a fresh U10 install? Put another way, I'm not sure if the compliant library is considered a "new feature" (i.e. not part of the U10 patchset), or a fix to an existing feature (i.e. should be part of the U10 patchset).

Thanks for your continued insight into Sun's (okay, Oracle's) compilers.

Posted by guest on October 24, 2011 at 07:38 AM PDT #

Oops - should have looked at the original source. It seems that -library=stdcxx4 is only available on new installations of S10U10, not on versions patched to the U10 level using the patchset.

Posted by guest on October 24, 2011 at 07:42 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

Darryl Gove is a senior engineer in the Solaris Studio team, working on optimising applications and benchmarks for current and future processors. He is also the author of the books:
Multicore Application Programming
Solaris Application Programming
The Developer's Edge

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
5
6
8
9
10
12
13
14
15
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
The Developer's Edge
Solaris Application Programming
Publications
Webcasts
Presentations
OpenSPARC Book
Multicore Application Programming
Docs