User forums > Help
Static vs Dynamic runtimes with GCC & VCTK
thomas:
--- Quote from: kagerato on August 07, 2005, 08:30:27 pm ---Optimization is likely pretty poor (if it exists at all) with a compilation time that short
--- End quote ---
According to various benchmarks I found on the net, that is (surprisingly) not true. gcc uniformly performs singnificantly (around 20-30%) worse than MSVC and DM which are both more or less equal.
But then, "impartial benchmark" is maybe the strongest oxymoron in existence. Personally, I doubt that such gross numbers reflect anything that is even remotely true in a "real" application. More likely, either the commercial compilers are actually optimized to 'cheat' in known synthetic benchmarks, or there is a systematic error in the assay (comparing debug to release maybe?).
One other thing to note is that those infavourable benchmarks use really old versions of gcc, so it is even more uncertain in how far they are accurate today.
My personal experience building wxWidgets is:
gcc 3.4.422:11 minutesDigital Mars1 second (bailing out after 5 or 6 errors)To me, that is gcc 100 points, DM zero.
Maybe gcc is slow, I care not. It never failed me, and it is a mighty fine compiler.
Who needs to rebuild of wxWidgets 5 times per day, anyway. :)
takeshimiya:
Not exactly wxWidgets (DMars isn't optimized to only compile faster wxWidgets :lol:)
But I found myself compiling and rebuilding Code::Blocks more than 5 times per day (I guess I'm not the only one).
Compiling the entire Code::Blocks tooks me more than 10 minutes.
If DMars were supported (note that the only currently compiler tested for C::B is GCC) for compiling Code::Blocks itself, I would be compiling it in 30 seconds.
That for sure means a lot to me.
But Yiannis told that one of these days other compilers would be supported also. :)
Regarding speed of execution (optimization), probably the best compiler is the Intel Compiler, at least in my experience.
kagerato:
--- Quote from: takeshimiya on August 07, 2005, 09:21:35 pm ---It's 5 minutes in OpenWatcom BUT if you have: "A pentium 4 (dual-core) 3.2 GHz CPU and 2 gbyte RAM".
Most of us don't have that processing power :(
--- End quote ---
Unfortunately.
--- Quote ---BTW, comparing your benchmarks and the benchmarks made by wxHatch, seems to have almost the same ratio:
(...)
It wouldn't be illogical then, to think that you can compile with your HIGH spec pc, the complete wxWidgets library using DMars in 45 seconds.
--- End quote ---
The ratios are approximately the same indeed. DMC takes a bit longer than 45 seconds; my timer says 58 seconds.
--- Quote ---Better not to talk about the optimizations of Open Watcom. GCC is very good though (lower is better, in milliseconds):
Open Watcom 1.1 DEBUG: 11922 ms
Open Watcom 1.1 RELEASE: 6578 ms
GCC 3.2 RELEASE: 2031 ms
DMars DEBUG: 3812 ms
You can see DMars in DEBUG mode outperforms Open Watcom even in RELEASE mode.
--- End quote ---
If these figures are accurate, then Digital Mars is quite the piece of work.
Open Watcom 1.3 is the newest release. However, I don't expect that any of its versions can really compare to the extensive optimizations applied by GCC.
--- Quote ---About the debugger, DMars works with Symantec, Zortech, Rational Systems, Multiscope, and Microsoft debuggers (dunno about GDB).
Anyways there will be a point (hopefully) when you probably rarely need a debugger (I know that there are people that doesn't debuggers anymore)
--- End quote ---
The docs say that it supposedly supports this ".map" format, but I have no idea how to use that. None of those debuggers seem to be integrated into anything I can download for free, so even if one was to obtain the debugger he would still need some commercial IDE to make the whole process efficient.
GDB has the kind of high-level integration with tools that I enjoy. Microsoft's development environments work similarly (or better) with their debugger(s), but it's all commercially-oriented. Besides, most of their tools are .NET-centric now.
--- Quote ---The more compilers (that support the standards) the better :)
--- End quote ---
Agreed.
--- Quote from: thomas ---Who needs to rebuild of wxWidgets 5 times per day, anyway.
--- End quote ---
Normally, I don't even need to build it once a day. However, I happen to be messing around with the features in setup.h (and of course you must rebuild to see the effects).
grv575:
The intel compiler definately does the best optimization, but I was under the impression that even msvc does more optimization than gcc. IOW, the MS and intel compilers can afford to be more platform specific.
takeshimiya:
Yes, the MSVC compiler does more optimization than GCC, that's why almost all fast firefox unofficial builds are being made with MSVC 2003 and 2005 instead of the default GCC. No one got working mozilla in the Intel compiler yet.
It really depends on what are your needings, however I think that anyone must use more than one compiler, to make sure your code is cross-compiler.
When you want:
-Very fast compilation times, Digital Mars is the best for the task (Borland 5.5 sometimes also).
-Very optimized programs, the Intel Compiler is the best (followed by the latests releases of MSVC)
-Very small executable size, the MSVC is one of the best (Borland and Digital Mars sometimes also)
-Normally optimized programs, very big executable size, the worst compilation times, but the most supported compiler that runs on almost all architectures, the king is GCC (the slow compilation times are expected to change when GCC4 matures).
Currently the de-facto standard in the opensource is GCC, so always the code must compile in GCC.
A note about the Digital Mars debugger, you can use free debuggers like ones from Microsoft: (Codeview, symdeb, windbg, and VC++ debugger) ie. Instructions for windbg.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version