X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:references :in-reply-to:subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-mailer:thread-index:x-mimeole; bh=dxxGUjhSK6kPe0EdaRmmgLpfOy4NqKNqyqKupJug5uc=; b=LzKjh/gMudB13J8HR4+0lf57da1sbkkJhs47OHEd8YVs/d8qZ6npHAfkCo5YXcqgC2 4QtHhEiteshBnf6XqjCe6r7VHVgAFe18ai/zykoRiU2H1xpCfFNe7kj7jr0luGXZmPTP q7nKCjx/L0yqcJtrjD6Ix9roLUKGoW2x9luws= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-type:content-transfer-encoding:x-mailer:thread-index :x-mimeole; b=QGZTvmxUs91DWegtEHkO/8Lq0VsrjaX8lU/xTIzcY/u7YY5COXV6nc4K1cIhjc3Wrm Fsh8mly06OM7soZpT+HMlvFUMt8ARfn65kJVi9nqQlnjQFbJfUr+K8/sERNUhT240T58 xM1X2kxe8nQQWWHalAsPsiB8SDmp/DiNQRUtI= From: "Matthew Petricoen" To: References: <4e67d035-8f32-4e9e-a78c-2370909f9ffb AT k11g2000vbf DOT googlegroups DOT com> In-Reply-To: Subject: RE: PB on CPU Atom Date: Tue, 4 Jan 2011 14:03:39 -0500 Message-ID: <6E29B11AEA054C17BD1E1A3A89AAC207@KAIN> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 thread-index: AcusLtrUlDQE+BT+Qq6/7yrfAEkKVAAEpFyw X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7600.16543 Reply-To: djgpp AT delorie DOT com Hello. I'm not sure if someone has suggested this before, but have you tried to inline "affcarinchtest". That seems to be a fairly long loop. Depending on gcc, you might have to use something along the lines of __attribute__((always_inline)). I don't think "inline" alone works like it used to. -----Original Message----- From: philippe [mailto:philippe DOT meynard AT gmail DOT com] Sent: Tuesday, January 04, 2011 11:25 AM To: djgpp AT delorie DOT com Subject: Re: PB on CPU Atom > 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? No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.872 / Virus Database: 271.1.1/3358 - Release Date: 01/04/11 02:34:00