Stream benchmark performance

jimdempseyatthecove
Total Points:
36,537
Status Points:
36,537
Black Belt
October 21, 2008 7:08 AM PDT
Rate
 
#4 Reply to #3

What happens when you remove the #pragma ivdep from the 2nd loop?
What happens when you add #pragma vector always to the 2nd loop?

In the static memory array loop the address of the arrays require no register usage as they can expressed using the Base part of the addressing.

In the dynamic array loop the addresses of the arrays are on the stack requiring an instruction to copy the pointer to the array to a register and if there are sufficient registers available the compiler could move the base address fetch outside the loop. To fully registerize the base of the three arrays in the second loop will require an additional three registers over what the first loop reqires.

An additional matter that could influence performance is the alignment of the arrays. If the static arrays are aligned on a 16 byte address and the dynamic are not. In this case the 2nd the loop (when vectorized) might be performing split loads/stores.

Jim Dempsey


--------

Blog: The Parallel Void


www.quickthreadprogramming.com


Intel Software Network Forums Statistics

8491 users have contributed to 31629 threads and 100770 posts to date.
In the past 24 hours, we have 28 new thread(s) 124 new posts(s), and 174 new user(s).

In the past 3 days, the most popular thread for everyone has been Implicite multithreading ??? The most posts were made to Crash when loading skeleton The post with the most views is Dear Steve, excuse me for a d

Please welcome our newest member shadowwolf99