From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fa528,d79af07892182421 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-12-13 05:47:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.clara.net!heighliner.fr.clara.net!proxad.net!feeder2-1.proxad.net!news1-1.free.fr!not-for-mail From: "JF Larvoire" Newsgroups: comp.unix.tru64 References: <3df9b8da$0$22996$626a54ce@news.free.fr> <874r9i3zar.fsf@student.uni-tuebingen.de> Subject: Re: Measuring VERY short durations Date: Fri, 13 Dec 2002 14:44:56 +0100 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <3df9e50d$0$18245$626a54ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 13 Dec 2002 14:47:57 MET NNTP-Posting-Host: 192.6.111.74 X-Trace: 1039787277 news1-1.free.fr 18245 192.6.111.74 X-Complaints-To: abuse@proxad.net Xref: archiver1.google.com comp.unix.tru64:9259 Hello, I tried it, but it does not seem to work: It compiles OK, but when I test it with in the trivial attached program, I get this result: Sum 1 done in 9 cycles. Sum 2 done in 6 cycles. It's obviously wrong, as there should be more cycles, and also the second loop should take 2.5 longer to execute. Any clue? Jean-Fran�ois void main(int argc, char *argv[]) { unsigned u0, u1, u2; int i; int n; u0 = realcc(); for (i=0, n=0; i<10; i++) n += i*i; u1 = realcc(); for (i=0, n=0; i<25; i++) n += i*i; u2 = realcc(); printf("Sum 1 done in %u cycles.\n", u1-u0); printf("Sum 2 done in %u cycles.\n", u2-u1); return; }