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

原创 2001年06月23日 23:10:00

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
icl 650 sec
gcc 472 sec
lcc 213 sec
Compilation time with no optimizations
icl 236 sec
gcc 400 sec
lcc 198.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)
icl 33.7 sec
gcc 35.6 sec
lcc 39.8 sec
Execution time (no optimizations)
icl 43.5 sec
gcc 46.6 sec
lcc 47.8 sec
Code size (optimized)
icl 2 056 192
gcc 1 728 000
lcc 1 831 968
Code size (no optimizations)
icl 2 946 048
gcc 2 679 808
lcc 2 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
icl 192.3 sec
gcc 175 sec
lcc 43.5 sec
Compilation time with no optimizations
icl 73 sec
gcc 152.2 sec
lcc 36.9 sec
Code size with optimizations
icl 1 033 728
gcc 786 432
lcc 785 440
Code size with no optimizations
icl 1 218 560
gcc 1 248 256
lcc 969 248
Execution time with optimizations
icl 35 sec
gcc 40.3 sec
lcc 44 sec
Execution time with no optimizations
icl 48.8 sec
gcc 60.7 sec
lcc 51.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:
icl 3.9 sec
gcc 4.8 sec
lcc 5.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.

Error spawning xicl6.exe 卸载Intel C++ Compiler后Visual C++ 6.0不能工作了

 转自 http://www.cppblog.com/zealsoft/archive/2006/06/13/8501.html 卸载Intel C++ Compiler后Visual C++ ...
  • gengxt2003
  • gengxt2003
  • 2007年03月12日 14:43
  • 1999

comparison of distinct pointer types lacks a cast

http://blog.163.com/againinput4@yeah/blog/static/122764271200962305331388/ 【问题】 某函数中:       unsig...
  • yongan1006
  • yongan1006
  • 2012年01月03日 15:47
  • 3415


Code::blocks基本使用教程 “ConsoleCplus - Debug”: The compiler’s setup (GNU GCC Compiler) is invalid, so Co...
  • u011331383
  • u011331383
  • 2015年02月12日 23:09
  • 1559

[Error] ISO C++ forbids comparison between pointer and integer [-fpermiss

错误代码: if(a[i]=="G"&&b[i]!="C")     return false;  改正后的代码: if(a[i]=='G'&&b[i]!='C')     return fals...
  • u012441545
  • u012441545
  • 2016年05月31日 11:35
  • 2269

error : comparison of distinct pointer types lacks a cast

【问题】 某函数中:       unsigned int flags; 。。。。     local_irq_save(flags); 。。。。。 编译后,出现警告:co...
  • zyllong
  • zyllong
  • 2014年08月13日 16:19
  • 1376

comparison between distinct pointer types 'QPushButton*' and 'QAbstractButton*' lacks a cast

Qt5使用QDialogButtonBox     右击buttonBox 选“ go to slots"  (即转到槽),自动完成槽函数的添加     private slots;      ...
  • desert187
  • desert187
  • 2013年09月05日 21:22
  • 3395

iOS:“warning:comparison between pointer and integer”

if (num == 0) { //提示 Comparison between pointer and integer ('id _Nullable' and 'int')    转换下就好了 i...
  • sdsd13212
  • sdsd13212
  • 2016年10月14日 16:25
  • 4006

C warning“comparison between pointer and integer [enabled by default]”

一个小程序 #include void PrintHello(void) {   char ptr[] = "Hello wordl";   printf("%s\n",ptr...
  • xiaotjx
  • xiaotjx
  • 2012年08月07日 09:39
  • 2381

Ordered comparison between pointer and zero ('const char *' and 'int')

更新Xcode 9后原来的项目报错  之前忘了是改什么了虽然不报错,但是运行后连不上网。 今天试了把0 改为  (char *)0 可以了了 ,又试了其他的 (void *)NULL , ...
  • u010069091
  • u010069091
  • 2017年11月07日 17:14
  • 175

Ubuntu 12.04 配置intel c++ compiler开发环境

之前一直在windows下开发,写了很多内嵌汇编,现在要移植到Linux下,幸好intel编译器支持Linux,这里以Ubuntu 12.04作为系统平台。 首先下载你想使用的intel编译...
  • lifesider
  • lifesider
  • 2013年12月27日 10:39
  • 7697
您举报文章:A comparison between lcc-win32, gcc, and Intel's icl compiler