- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page