X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: philippe Newsgroups: comp.os.msdos.djgpp Subject: Re: PB on CPU Atom Date: Tue, 4 Jan 2011 08:25:20 -0800 (PST) Organization: http://groups.google.com Lines: 53 Message-ID: References: <4e67d035-8f32-4e9e-a78c-2370909f9ffb AT k11g2000vbf DOT googlegroups DOT com> NNTP-Posting-Host: 80.70.37.40 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1294158320 11655 127.0.0.1 (4 Jan 2011 16:25:20 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Tue, 4 Jan 2011 16:25:20 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: i25g2000prd.googlegroups.com; posting-host=80.70.37.40; posting-account=aoZx2woAAADtfEzA-h1Fpu5B96M9fx2b User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 1.1.4322),gzip(gfe) Bytes: 2901 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com > I discovered that: When I used a call who is in another source file > that my source file test then the program is very slow but when I put > the call function in the same file that the source test then the > program is very fast. Why? Hi, everybody and happy new year. I come back on my problem and in fact I discovered this. my test program use 2 source file. see : test1.c vois test1(void) { char a; uint64 debclock1,finclock1; uint64 tpscalc; long tpscalc2; char chaine[80]; int i; init_cpu_speed(); printf("start\n"); debclock1=get_rdtsc(); for(i=0;i<3200000;i++){ affcarinchtest2(a,chaine); a++; if(a>'Z') a=65; } finclock1=get_rdtsc(); tpscalc=finclock1-debclock1; tpscalc2=(long)(((tpscalc*MULT_COUNT_US)/COUNT_CPU_BY_SECOND)); printf("time 1: %ld\n",((long)tpscalc2)); } test2.c void affcarinchtest(char chaine,char *ptrch) { *ptrch=chaine; } when I compile this only 2 files I have a executed time correct, but When I compile this file with another source files and who create a big program (> 3Mo) then I have a executed time very long (10 time longer!) I suppose that the problem is the call function is different if the call is short or long ? I test with many different option(like Rugxulo suggest : mtune, without O3, etc), without succes. With different version of gcc, without succces I haven't test with -Atom option of gcc because it's only implemented on gcc 4.5 and not on djgpp. Have you a suggestion?