Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Binary size reduction - UPX

<< < (4/5) > >>

Ceniza:
Sorry, but I cannot agree with Muhammad: The best C/C++ compiler for Windows is Intel C++.

It's a shame it needs the libraries, headers and some programs of Visual C++ to work, but it's The One :)

takeshimiya:
I disagree with both. :lol:

There isn't anything like THE compiler (at least for now). Every compiler have his own pros and cons.
A rough guide of the current most used compilers would be:

MSVC 7
-Binary size: Smallest
-Compilation time: Very good
-Speed of execution: Very good
-Platform: Windows

GCC 3
-Binary size: Biggest
-Compilation time: The worst
-Speed of execution: Very good
-Platform: Everywhere

DMars 8
-Binary size: Good
-Compilation time: The best
-Speed of execution: Average
-Platform: Windows

Intel 8
-Binary size: Big
-Compilation time: Slow
-Speed of execution: The best
-Platform: Windows, Linux

OpenWatcom 1.1
-Binary size: Good
-Compilation time: Average
-Speed of execution: Slowest
-Platform: Windows, OS/2

Borland 5.5
-Binary size: Average
-Compilation time: Very good
-Speed of execution: Very good
-Platform: Windows

Hence, a choice could be: DMars while developing, MSVC for win32 release, GCC for everything else.

rickg22:
Don't forget that Intel compiled executables are slower when run in AMD processors.
http://www.theinquirer.net/?article=24574

Ceniza:
Hmmm, that article is related to a problem already fixed in the Intel Fortran compiler.

A few years ago I was helping test some code with the Intel C++ compiler vs GNU G++ and the tests ran in an AMD machine.

In fact the generated code was pretty good and he hadn't any problems running it.

It's true Intel compilers are optimized for Intel processors and technologies (I think the reason is obvious) but compiling with the right flags the executables will run just fine in both Intel and AMD processors.

BTW, there's an article around about GCC vs Intel C++. It measures performance, compilation time and executable size. It shows that both Intel C++ and GCC are pretty good competitors, but it also shows that in some cases Intel C++ generates much better code.

Oh, and we're going off-topic again, don't we?

takeshimiya:
Yep, just to note that there are some hacks to disable the "if it's an AMD CPU then I'll unoptimize the code" check.
You had to #define something, and that's all to disable the lame check.

Anyways, AMD bring out Intel to the court regarding this, so it's possible that new versions of the compiler will not include the lame check.

The funny part, it's that even with those unoptimizations, on an AMD CPU, the compiler is in most benchmarks better than GCC or MSVC (regarding speed of execution).

But I think that the Intel Compiler isn't very helpful for compiling C::B, as it would provide only an advantage regarding speed.

I still think that a good approach is:
DMars while developing for it's amazing compilation time,
MSVC for win32 release for it's amazing binary size, and
GCC for everything else for it's amazing availability everywhere. :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version