Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

ICC code much slower than GCC code

peter_silie
Beginner
2,014 Views

Hi, I compiled the following program with ICC 10.1 (20080801) using options '-O3 -axT' and with GCC 4.3.1 using options '-O3 -mtune=generic'. Surprisingly, the GCC code runs much faster (6.6s) than the ICC code (16.3s) on a Xeon @ 2.8 GHz. Any ideas where this difference comes from? Thanks a lot.

#include

int main() {
int src[XRES][YRES], dst[XRES][YRES];

for(int i = 0; i < 100; i++)
for(int x = 0; x < XRES; x++)
for(int y = 0; y < YRES; y++) {
int sum(0), count(0);
for(int xb = std::max(x-(MASK/2),0); xb for(int yb = std::max(y-(MASK/2),0); yb sum += src[xb][yb];
count++;
}
dst = sum/count;
}

return(dst[0][0]);
}

0 Kudos
21 Replies
JenniferJ
Moderator
111 Views

There is an issue with the IDZ that when adding any note to the thread or changing the thread status, it got bumped up to the top. This issue has been brought up, but just has not been resolved. It is why this thread got displayed on the top. 

Jennifer  

0 Kudos
Reply