
Howard Hinnant wrote:
It's been awhile since I looked at the most recent Freescale STL, but last time I looked, this flag was on by default. This optimization was originally written before the Freescale linker did code folding. After the Freescale linker did code folding it appeared to me that the two optimizations worked together synergistically. I.e. sometimes the lib would catch stuff the linker missed and vice-versa.
Caught lurking again ;-)
Fwiw, it isn't an easy optimization in the lib to get right (I got it wrong first time out of the gate). But it does seem worthwhile. I had a major customer once tell me this optimization saved him 750Kb code, and this was back when a Mb of code was a lot. ;-)
This might be an interesting addition to Interprocess (apart from adding the use of memcpy/memmove for POD types). Fwiw, I've saved some KB on my executable on such systems changing uses of "once-constructed read-only" strings from std::string to hand-managed const char *. Sometimes, something similar to a unique_array<const char *> is all that you need.
-Howard
Regards, Ion