NORM2 Intrinsic Performance

NORM2 Intrinsic Performance

All,

I'm just wondering if there is a good reason why calling SQRT( DOT_PRODUCT( V,V ) ) seems to perform better than NORM2(V). I'm trying to improve performance for a large program written in Fortran and I thought an easy first step would be to switch the first call to the second, but more testing proved otherwise. I compiled a test program with /O3 and /fp:source. I will admit when I use /fp:fast NORM2 is faster. Unfortunately, our legacy program requires /fp:source. I've attached the really rough source file for the program I used to test the performance. Is my test program flawed? This really is more of a curiosity than anything else. Thanks.

AdjuntoTamaño
Descargar Console1_0.f901.53 KB
publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Your program doesn't use the result of either call, so the compiler optimized both away. Your program doesn't show what you think it does.

Steve - Intel Developer Support

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya