On Mon, Aug 08, 2005 at 06:30:58PM +0300, Ariel Biener wrote:
> YMMV, but the difference between running with gcc 3.4.3 was huge:
Because with this invocation
> gcc -O2 -fno-math-errno -o /tmp/bnch-O2-no-math-errno /tmp/drek.c -lm
gcc actually optimises sqrt away and never calculates it. No wonder the
difference is huge.
Try doing something with q after the loop to force it to compute sqrt,
that'll reflect reality better. printf or whatever. If you don't want
to call functions, use
int
main(int argc, char **argv)
{
long long i;
double q;
for (i=0; i<10000000; i++) {
q = sqrt(i);
}
**argv = (char)q;
}
--
avva
"There's nothing simply good, nor ill alone" -- John Donne
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]