On Tue, Oct 07, 2008 at 12:38:11PM -0400, Michael Meissner wrote: > On Mon, Oct 06, 2008 at 11:23:32PM -0700, jackfrost wrote: > > > > > > Ian Lance Taylor-3 wrote: > > > > > > Try -ffast-math. I think it's the default for icc when optimizing. > > > Ian > > > > > > > I've tried -ffast-math. > > with the same result. > > Since the two tests are nothing but sin and exp calls respectively, you need to > get faster/vector versions of the sin/exp routines. If you are using the > development version of the compiler you can use either AMD's optimized math > library (acml) or Intel's optimized math library (svml), both of which provide > vectorized versions of sin/exp. You will need to download these libraries from > AMD or Intel respectively. I forgot to mention to use ACML you need to use the -mveclibabi=acml option, and to use SVML you need to use the -mveclibabi=svml option. FWIW, on my 2 year old AMD athlon, I get a time of 0.91 with -mveclibabi=acml, and 1.21 without -mveclibabi. On the core2 laptop I'm using right now, I get a time of 0.67 with acml and 1.0 without. I don't have a copy of svml to test. -- Michael Meissner, IBM 4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA meissner@xxxxxxxxxxxxxxxxxx