Comparison Details:
The Best Compiler for The Intel Processors Is Surely ICL, The Compiler of Intel Corporation. It benefits of the inMense Resources And Know-How the INTEL CORP.
GCC Is a Compiler That Sharees with LCC-WIN32 ITS Low Price, But Has A Long Development History, And A Team of Many People Dedicated to IT.
lcc-win32 has been the result of the work of just three people. There is no budget, no institution whatsoever funding this work. In light of this conditions, the performances of lcc-win32 are quite acceptable, in my opinion.
Two Different Source Sets Were Used for this Comparison:
The source code of egcs 1.1b itself. Around 12 Megabytes of C source, this code represents a real complex application. The symbolic calculator GP of Grenoble University in France. This code was used to measure the pure CPU integer speed in a real context of complex calculations. This program does not do any disk access other than reading a very small source file written in the calculator's internal language. The sources represent approx 1.5 megabytes of C code. The version of gcc used was GNU C version egcs-2.91. 57 The Version of the ICL Compiler Was Version 2.4 P97176 The Version of LCC WAS 2.4, Compiled NOV-3 98 The Machine Used Was a Pentium MMX (Intel) AT 200MHz with 64MB RAM.
Compiableing EGCS 1.1B
ICL Compiler Was Given -os (Optimize for size), GCC WAS Given -o, And LCC WAS Given -o. If i change the gcc optimizations for -O9, Execution Speed Actually Increased ..., SO i Kept Just Plain -o , That Seems to Generate Better Code.
Compilation Time with OptimizationSICL650 SECGCC472 SECLC213 SEC
Compilation Time with no optimizationsicl236 secondimizationsicl236 secondimiz400 seclcc198.4 SEC
To measure the speed of the resulting executable, the same source file was used: a large file of 270.999 bytes C source, that was given to the three generated compilers The exact command line is:. Xxx.exe -O9 win32.c
ALL EXECUTABLES WERE Started Twice, and Only The Second Time Was Significant To Avoid The Influence of The Disk Cache.
Execution Time (Optimized) ICL33.7 SECGCC35.6 SECLC39.8 SEC
Execution Time (No Optimizations) ICL43.5 SECGCC46.6 SECLCC47.8 SEC
Code Size (Optimized) ICL2 056 192GCC1 728 000lcc1 831 968
Code size (no optimizations) ICL2 946 048GCC2 679 808LCC2 213 920
Compiling the symbolic calculator 'gp'
ICL Compiler Was Given -ox. GCC WAS GIVEN -O, AND LCC WAS GIVEN -O.
Compilation Time with optimizationsicl192.3 secGCC175 SECLCC43.5 SEC
Compilation Time with no optimizationsicl73 second school152.2 seclcc36.9 sec
Code size with optimizationsicl1 033 728GC786 432LCC785 440
Code Size with no optimizationsicl1 218 560GCC1 248 256LC969 248
Execution Time with optimizationsicl35 secgcc40.3 SECLCC44 SEC
Execution Time with no optimizationsicl48.8 secgcc60.7 seclcc51.3 SEC
A floating point commit
As measure I used a matrix multiplication program. Since the source is very small (37K) there is no point in measuring the compilation speed. I used the option -0x for intel, -02 for gcc, and -O for lcc. The results Are As Follows:
ICL3.9 SECGCC4.8 SECLC5.6 SEC
IT Must Be Noted That Intel's Compiler Comes with a Very High Performance Floating Point Math Library. LCC (AS GCC) Uses The Standard Library Of Windows
Another Important Point Is That The Results of Icl And LCC WERE EXACTLY IDentical. The Results of GCC Differed After The 13th Digit.