Mail Archives: djgpp/2001/02/09/10:35:26
Tanes Sriviroolchai <Tanes DOT Sriviroolchai AT thailand DOT ncr DOT com> wrote:
> Michael,
> The current libstdc++ distributed with gcc 2.95.2 is not ISO C++
> Standard compliant according to gcc homepage
> (http://gcc.gnu.org/bugs.html#known). Implementation of STL included but not
> in std:: namespace but in global namespace. I think you should try compare
> its compile size with new libstdc++ v3. I think namespaces and many template
> things come with some price. :) Anyway, there is no problem to use namespace
> as long as you never have a problem with namespace clash, IMHO.
Anyway, lets estimate: if compile empty int main(void) { return 0; }
starting size (stub) if about 50 Kb. It means for 150 Kb and 750 Kb
files that one library it 7 (!!!) time bigger. The difference in the
funcuonality is negligible (comparing to basic_string, vector, set etc -
all that is already in the library). Namespaces cost nothing - they are needed
only at compile stage - they have no code. Number 7 - it is why I cannot
use in my programs (for DOS). Are you saying that libstdc++ is expected to
be a record-breaker ?
> Regards,
> Tanes Sriviroolchai
> "Michael N. Filippov" <michael AT idisys DOT iae DOT nsk DOT su> wrote in message
> news:95u99e$13m9$1 AT news DOT itfs DOT nsk DOT su...
>> I'm very surprised looking at this library size (no __STL_DEBUG or so -
> only
>> release compilation). Example:
>>
>> my$ cat main.cpp
>> #include <iostream>
>>
>> int main(void)
>> {
>> std::cout << "Hello, world !" << std::endl;
>> return 0;
>> }
>>
>> my$ gcc main.cpp -s -o main_std.exe -lstdcxx
>> my$ gcc main.cpp -s -o
> main_stlp.exe -I../../stlport -L../../lib -lstlp -lm
>> my$ ls -la
>> -rw-r--r-- 1 dosuser root 107 Feb 8 19:48 main.cpp
>> -rwxr-xr-x 1 dosuser root 150528 Feb 8 19:50 main_std.exe
>> -rwxr-xr-x 1 dosuser root 757248 Feb 8 19:51 main_stlp.exe
>>
>> Does this library offer a lot of new functionality comparing to the
>> Hewlett-Packard version (standard in DJGPP distribution). I see that
>> only locale (monerary, facets) and sstream functions are new.
>> I would be very appreciated if somebody would explain why it is so big ?
>>
>> Sincerely,
>> Michael
- Raw text -