why so slow? gcc vs vc6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've written a small numeric program(600 lines) with c under linux. I
compiled it under 64bit linux using 64bit gcc-3.4(without linking
other external library), the program runs very slow.
Then I managed to compile it under windows using VC on a machine which
is exactly the same with mine(amd64 2800, 1g ram). The program runs
very fast, the speed is nearly 1000 times faster. I don't know how to
solve the problem, as my main develop environment is linux.
I used gcc as follows:
gcc-3.4 -g0 -march=k8 -O3 -fomit-frame-pointer -funit-at-a-time
-fpeel-loops -ftracer -funswitch-loops -mfpmath=sse
(do not use -ffast-math, as it will cause output error)
with vc6.0 I just use the default options.

I use clock()/1.e6 to determine the time elapsed in second
under linux, output : 1.39 s
under windows, output: 2.5e-3 s


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux