|
From: Danny S. <dan...@cl...> - 2006-03-21 21:00:14
|
> -----Original Message----- > From: Danny Smith > Sent: Tuesday, March 21, 2006 3:40 PM > > Care to provide a testcase so we all know what your talking about? <blush> I apologize. You did send a testcase in original posting. OK. Looking at assembler code, the difference is that (1)current version of mingw doesn't use -ffast-math (replacing library calls by inline asm) by default. This is a safe default since library calls have greater range/accuracy near extremes than naked asm. Also libray calls may have side effect of setting fp errs. (2) Not inlining sin -> fsin, cos -> fcos prevents other optimizations/ (3) GCC-3.4.5 is not smart enough even with --ffast-math to replace fsin/fcos calls with fsincos calls when advantageous (it is in your testcase). GCC-4.1 is. With your testcase and and gcc-3.4.5 and switches -O2 -ffast-math time is reported as about 20-22 on my Athlon 2000, With your testcase and and gcc-4.2 and switches -O2 -ffast-math time is reported as about 7-8 on my Athlon 2000, With your testcase and and msvc6 with option /O2 time is reported as 10-11. HTH Danny > > > |