From: "JF Larvoire" <jean-francois.larvoire@remove_this.free.fr>
Subject: Re: Measuring VERY short durations
Date: Fri, 13 Dec 2002 14:44:56 +0100 [thread overview]
Message-ID: <3df9e50d$0$18245$626a54ce@news.free.fr> (raw)
In-Reply-To: 874r9i3zar.fsf@student.uni-tuebingen.de
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 654 bytes --]
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;
}
next prev parent reply other threads:[~2002-12-13 13:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-13 10:36 Measuring VERY short durations JF Larvoire
2002-12-13 11:59 ` Falk Hueffner
2002-12-13 13:44 ` JF Larvoire [this message]
2002-12-13 13:56 ` Andrew Duane USG
2002-12-18 10:03 ` JF Larvoire
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox