Dirk Mueller mueller at kde.org
Wed Sep 13 16:35:43 BST 2006

On Wednesday 13 September 2006 16:56, David Faure wrote:

> Wow that's a large difference if it's indeed only due to -DQT_NO_STL.
> Surprising, for just a few typedefs....

A few typedefs? 

$ cat st.h:
#include <string>
#include <map>
#include <iterator>
#include <list>
$ g++ -c st.h -o - -E | wc -c

so each and every compilation unit gains 780kb (!) of source code just by not 
using QT_NO_STL. we have about 1500 compilation units in kdelibs, which means 
just this one little #define saves around 1 GB of data the compiler has to 
parse, to interpret, stuff into the main memory, and then throw away for no 
reason at all. 

> , you are only saying that we are not using them right now (so of 
> course QT_NO_STL changes nothing). You imply that with stl algorithms it
> would be worse, but this is no proof, it might well be better when used
> properly.

I've yet to see a single real world application that uses it properly. 


More information about the kde-core-devel mailing list