Thread: g++ is very slow when compared to cl

  1. #16
    Banned
    Join Date
    Nov 2007
    Posts
    678
    laserlight: i will post the info when i go home, the MinGW is in my home computer.
    although outdated (per se Elysia) in office i use MSVS 2003 .Net.

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by manav View Post
    although outdated (per se Elysia) in office i use MSVS 2003 .Net.
    In other words: they force you to use it?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #18
    Banned
    Join Date
    Nov 2007
    Posts
    678
    Yeah. You are right Elysia.
    My job requirements make me use Qt 4.1 when there is 4.3, SCons 0.96 (Yuck!) MSVS 2003 etc. etc.

  4. #19
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by maxorator View Post
    How can you tell that? Have you examined some disassembly?
    No. I just look at the resulting executable sizes. Duh!
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #20
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    In other words: they force you to use it?
    At least it is reasonably standards compliant, unlike MSVC6 or MSVC7.

    SCons 0.96 (Yuck!)
    Hehe, I noticed that SCons 0.98 was released on 31 March.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  6. #21
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by laserlight View Post
    At least it is reasonably standards compliant, unlike MSVC6 or MSVC7.
    Better than nothing, at least. Unlike someone else's job who still uses the old MSVC6 compiler
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #22
    Banned
    Join Date
    Nov 2007
    Posts
    678
    laserlight this is for you:

    g++:
    Code:
    Reading specs from C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs
    Configured with: ../gcc-3.4.5/configure --with-gcc --with-gnu-ld --with-gnu-as -
    -host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --
    enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shar
    ed --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --ena
    ble-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-sync
    hronization --enable-libstdcxx-debug
    Thread model: win32
    gcc version 3.4.5 (mingw special)
    my system:
    Code:
    OS Name	Microsoft Windows XP Professional
    Version	5.1.2600 Service Pack 2 Build 2600
    OS Manufacturer	Microsoft Corporation
    System Name	INTEL
    System Manufacturer	INTEL_
    System Model	D845GBV2
    System Type	X86-based PC
    Processor	x86 Family 15 Model 2 Stepping 7 GenuineIntel ~1799 Mhz
    BIOS Version/Date	Intel Corp. RG84510A.86A.0028.P15.0302260937, 2/26/2003
    SMBIOS Version	2.3
    Windows Directory	C:\WINDOWS
    System Directory	C:\WINDOWS\system32
    Boot Device	\Device\HarddiskVolume1
    Locale	United States
    Hardware Abstraction Layer	Version = "5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)"
    User Name	INTEL\Administrator
    Time Zone	Pacific Standard Time
    Total Physical Memory	512.00 MB
    Available Physical Memory	236.27 MB
    Total Virtual Memory	2.00 GB
    Available Virtual Memory	1.96 GB
    Page File Space	864.94 MB
    Page File	C:\pagefile.sys

  8. #23
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    With 512MB of RAM and built-in graphics, you may not have enough memory to compile large projects. gcc and g++ are pretty memory hungry at times.

    If anything else, a bit more memory will allow the system to cache more of the include files and such.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  9. #24
    Banned
    Join Date
    Nov 2007
    Posts
    678
    thanks. actually maybe it depends on system load.
    this program compiled in 2 seconds only:
    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
    	cout << "Hello G++!\n";
    	return 0;
    }

  10. #25
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by matsp View Post
    With 512MB of RAM and built-in graphics, you may not have enough memory to compile large projects. gcc and g++ are pretty memory hungry at times.

    If anything else, a bit more memory will allow the system to cache more of the include files and such.

    --
    Mats
    I have 512MB of RAM and I'm no where close to experience manav's problems and never was. Granted, if all of those MBs are being used, I probably would. So maybe that's it. Too many things opened?
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  11. #26
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Mario F. View Post
    I have 512MB of RAM and I'm no where close to experience manav's problems and never was. Granted, if all of those MBs are being used, I probably would. So maybe that's it. Too many things opened?
    Yes, I agree, that 512MB should be enough, but you don't need much of antivirus software, graphics frame buffer and other such stuff to eat up enough that it starts swapping. And gcc is definitely not "lean" on memory usage.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  12. #27
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Surely 512mb RAM is plenty.

    Manav: maybe theres somethin eating up all your resources, either that or you have a very old pc.

    My laptop specs are:
    512mb ram.
    Celeron underclocked @ 630mhz
    280mhz bus.
    No GPU: leeches off ram instead.
    OS: Xubuntu

    But g++ will still compile pretty much any small project for me in less time than is noticable.
    Last edited by mike_g; 04-02-2008 at 08:43 AM.

  13. #28
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    512 MB is not plenty
    It's pretty poor these days. You can't have much running with 512 MB and expect a fast system...
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  14. #29
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    Don't Insult my new laptop Elysia

    On the plus side its only about 9" big and has a solid state HD that boots into xfce in around 30 seconds.

    Tbh I find 512mb ram more than enough for most of the things I do with a computer. I can still run FF with a load of tabs open, pidgin, the terminal, and gedit all at once with no paging. What more should I need?

  15. #30
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    LOL. We had this discussion before Elysia. Let it go. I think you were proved wrong back then. It's a matter of what you do with your computer. 512MB Ram can be plenty, yes. It IS plenty on my case. I honestly don't feel at all the need to put in some more.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. CL and C++
    By siavoshkc in forum C++ Programming
    Replies: 1
    Last Post: 09-24-2006, 03:01 PM
  2. Program is slow. Help
    By jjj93421 in forum C++ Programming
    Replies: 14
    Last Post: 08-08-2004, 07:39 AM
  3. slow game
    By lambs4 in forum Game Programming
    Replies: 2
    Last Post: 08-21-2003, 02:08 PM
  4. Solutions for slow performance?
    By Hunter2 in forum Game Programming
    Replies: 52
    Last Post: 08-24-2002, 10:04 AM
  5. slow load of Cprog.com
    By Generator in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 10-13-2001, 06:31 AM