Attached is a small program implementing the Newton-Raphson iteration for solving y = x * exp(x). ifort 13 does not vectorize the program unless the MIC architecture is targeted. Comparing the Fortran again with the equivalent C code written using the elemental function extension, the C code shows a 1.8x speedup when measured on Nehalem. Arguably, icc 13 is not optimizing hard enough, either. A version based on intrinsic functions shows 2.1x speedup over the Fortran code. Greater gains can obviously be expected on Sandy/Ivy Bridge.
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.