Dont have much experiences in Linux, I have some well-tested code, get no compliation error/warns from MSVC, ICC, run flawlessly in windows platform as well.

I then copied these codes to my newly installed linux system (Ubuntu 13.10 with GCC 4.8.1) then I installed the latest version of eclipse (3.8.1 or so) with CDT and configured it with the system's GCC compiler.

Eclipse CDT/GCC works fine with all the trivial test codes I wrote, I then ask GCC to compile the large piece of well-tested code from Windows.

GCC compiled it with NO errors and NO warns, and program run fine with trivial workloads, however, as soon as I give the program some real-world payload, it basically freezen, takes forever to complete (when in Windows, the same program can finish the "real-world" payload in a matter of seconds).

Can anyone tell me what should I looking for to fix this or GCC is just that slow in debug mode (I mean, at least 2-3 magnitudes slower than ICC/MSVC's debug mode), thanks.

The complation optimization level is set to be O3 for release mode, and the default setting (no optimization, or at least thats what I believe) for debug mode.

The problem is, My feeling is ICC/MSVC's debug-mode (with no optimization) binary is much faster (I mean, something like 1000 times faster) than GCC's one.

UPDATE: (At the moment it seems I cannot make comment at stackoverflow, so I have to put replies here, sorry):

ams: Well, I wait a few minutes, see the program still runs I just abort it, so I dont know whether the program can finish or not. However, as long as the payload is very small, it can finish it normally.

As for the bottleneck of the code, well, I think its memory-bounded.

The majority part of time (80+%) the code is doing some radix-sort with large input data array, the optimized radix sort code I wrote can sort 200-300 million 32 bit floating point values per second in Windows, but with the same hardware, in linux it seems it will take hours if not forever to sort some 10 million length data array.

**UPDATE:**

Thank for all you people's help, I figured out the problem lies in some macro I messed up with linux, now everything works fine.