A comparison between lcc-win32, gcc, and Intel's icl compiler

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 of Intel Corp.

GCC is a compiler that shares 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 doesn't 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.

Compiling egcs 1.1b

Icl compiler was given -Os (optimize for size), gcc was given -O, and lcc was given -O. If I changed the gcc optimizations for -O9, execution speed actually increased..., so I kept just plain -O, that seems to generate better code.
Compilation time with optimizations
icl650 sec
gcc472 sec
lcc213 sec
Compilation time with no optimizations
icl236 sec
gcc400 sec
lcc198.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 sec
gcc35.6 sec
lcc39.8 sec
Execution time (no optimizations)
icl43.5 sec
gcc46.6 sec
lcc47.8 sec
Code size (optimized)
icl2 056 192
gcc1 728 000
lcc1 831 968
Code size (no optimizations)
icl2 946 048
gcc2 679 808
lcc2 213 920

Compiling the symbolic calculator 'gp'

Icl compiler was given -Ox. gcc was given -O, and lcc was given -O.
Compilation time with optimizations
icl192.3 sec
gcc175 sec
lcc43.5 sec
Compilation time with no optimizations
icl73 sec
gcc152.2 sec
lcc36.9 sec
Code size with optimizations
icl1 033 728
gcc786 432
lcc785 440
Code size with no optimizations
icl1 218 560
gcc1 248 256
lcc969 248
Execution time with optimizations
icl35 sec
gcc40.3 sec
lcc44 sec
Execution time with no optimizations
icl48.8 sec
gcc60.7 sec
lcc51.3 sec

A floating point comparison

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 sec
gcc4.8 sec
lcc5.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.
  • 0
  • 0
  • 打赏
  • 0


  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
©️2022 CSDN 皮肤主题:大白 设计师:CSDN官方博客 返回首页




¥2 ¥4 ¥6 ¥10 ¥20
余额支付 (余额:-- )



钱包余额 0