NORM2 Intrinsic Performance

NORM2 Intrinsic Performance


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.

Downloadapplication/octet-stream Console1_0.f901.53 KB
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today