Article View: cn.comp.lang
Article #57Re: �ҵ��죬VS��VC++��GCC��ȣ�Ч�ʺܲ�һ��
From: batch
Date: Tue, 26 Jun 2007 05:57
Date: Tue, 26 Jun 2007 05:57
23 lines
2954 bytes
2954 bytes
奇怪的是,相差比较远。
"ChiLL" <arthur.ping.foo@gmail.com> 写入消息 news:f5obqv$63r$1@news.yaako.com...
> 这不是效率问题吧, 在Windows下VS编译后的运行效率应该还是比其它编译器来得高.
> "batch" <chinaonhb@hotmail.com> 写入消息新闻:f5o1u5$mch$1@news.yaako.com...
>> 看看这段程序:
>> ——————————————————————
>> #include <stdio.h>
>> #include <stdlib.h>
>>
>> int main ()
>> {
>> int a;
>> a = sizeof(char);
>> printf ("char %d\n",a);
>> a = sizeof(unsigned char);
>> printf ("unsigned char %d\n",a);
>> a = sizeof(short);
>> printf ("short %d\n",a);
>> a = sizeof(unsigned short);
>> printf ("unsigned short %d\n",a);
>> a = sizeof(int);
>> printf ("int %d\n",a);
>> a = sizeof(unsigned int);
>> printf ("unsigned int %d\n",a);
>> a = sizeof(long);
>> printf ("long %d\n",a);
>> a = sizeof(unsigned long);
>> printf ("unsigned long %d\n",a);
>> a = sizeof(long long);
>> printf ("long long %d\n",a);
>> a = sizeof(unsigned long long);
>> printf ("unsigned long long %d\n",a);
>> system ("pause");
>> return 0;
>> }
>>
>> ——————————————————————
>>
>> GCC用了16.1K,VC居然用了60K,而且已经使用了优化选项!
>> 这样相差实在离谱了点了。
>
>
Technical Details
Message-ID:
<f5q9sk$p28$2@news.yaako.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!news.szu.edu.cn!news.uestc.edu.cn!news.cn99.com!news.yaako.com!not-for-mailReferences:
<f5o1u5$mch$1@news.yaako.com> <f5obqv$63r$1@news.yaako.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11047e,68dfa6a18681adeb X-Google-Thread: 107c7f,68dfa6a18681adeb X-Google-Attributes: gid11047e,gid107c7f,public,usenet X-Google-Language: Chinese,GB Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!news.szu.edu.cn!news.uestc.edu.cn!news.cn99.com!news.yaako.com!not-for-mail From: "batch" <chinaonhb@hotmail.com> Newsgroups: cn.comp.lang,cn.comp.lang.c,cn.fan Subject: Re: �ҵ��죬VS��VC++��GCC��ȣ�Ч�ʺܲ�һ�� Date: Tue, 26 Jun 2007 13:57:14 +0800 Organization: Bentium Ltd. (CN99) Lines: 24 Message-ID: <f5q9sk$p28$2@news.yaako.com> References: <f5o1u5$mch$1@news.yaako.com> <f5obqv$63r$1@news.yaako.com> NNTP-Posting-Host: 61.144.79.242 Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 X-Trace: news.yaako.com 1182837461 25672 61.144.79.242 (26 Jun 2007 05:57:41 GMT) X-Complaints-To: usenet@news.yaako.com NNTP-Posting-Date: Tue, 26 Jun 2007 05:57:41 +0000 (UTC) In-Reply-To: <f5obqv$63r$1@news.yaako.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16480