|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
hello:
I recently compiled a numerically intensive c project under cygwin gcc 3.4.4 and microsoft visual c. The platform is intel T2400 1.83 ghz dual core lap top. the numerical stuff is both floating point and integer intensive The gcc optimized (-O3) vs non optimized improved the performance 30 % visual c optimized (standard , check 'release; under visual c 2005) vs non optimized ('build') was a whopping 8x performance gain but the most surprising thing was visual c optimized was 2x performance over gcc optimized. is anybody else seeing the same thing. if this is true microsoft c compiler is in a different league altogether i was not successful so far compiling under mingw. will it make dent ? 2x is hard to overcome |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
kumarchi@gmail.com wrote:
> hello: > > I recently compiled a numerically intensive c project under cygwin gcc > 3.4.4 and microsoft visual c. The platform is intel T2400 1.83 ghz > dual core lap top. > > the numerical stuff is both floating point and integer intensive > > The gcc optimized (-O3) vs non optimized improved the performance 30 % > The more you go with higher optimizations, the slower it goes. Use -O2. > visual c optimized (standard , check 'release; under visual c 2005) > vs non optimized ('build') was a whopping 8x performance gain > This is because the non optimized version injects a lot of checking code to avoid bugs. It is slower than strictly necessary. For instance they check at function exit if there wasn't a stack overwrite. > but the most surprising thing was visual c optimized was 2x > performance over gcc optimized. > Intel compiler is even better than Microsoft. It is the best compiler for the intel architecture. Period. > is anybody else seeing the same thing. if this is true microsoft c > compiler is in a different league altogether > Obviously Microsoft leaves gcc far behind, and I have been seeing this since at least 8-9 years. > i was not successful so far compiling under mingw. will it make dent ? > 2x is hard to overcome mingw is just gcc using Microsoft run time library. Do not expect anything better/worst. It is not surprising that gcc is slower than Microsoft since the people behind each project have vastly different objectives and budgets to implement them. Gcc is running in many platforms and architectures. Microsoft is running in one platform exclusively. Gcc implements standards like C99 (module small problems), Microsoft implements only Microsoft environments (.net, etc). Microsoft is still at C89 level. -- jacob navia jacob at jacob point remcomp point fr logiciels/informatique http://www.cs.virginia.edu/~lcc-win32 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
jacob navia wrote:
> Microsoft is running in one platform exclusively. Sorry, but that's untrue. The platforms I know are IA32, Intel's and AMD's 64 bit platforms, MIPS, ARM, SH and maybe some more. Note that the latter are used for MS' embedded platform. Uli |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
kumar...@gmail.com wrote: > hello: > > I recently compiled a numerically intensive c project under cygwin gcc > 3.4.4 and microsoft visual c. The platform is intel T2400 1.83 ghz > dual core lap top. > > the numerical stuff is both floating point and integer intensive > > The gcc optimized (-O3) vs non optimized improved the performance 30 % It's probably not going to you, but as a point of interest I have sometimes found -Os to work better (optimize for size) with gcc. Stijn |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On May 9, 4:20pm, jacob navia <ja...@nospam.com> wrote:
> kumar...@gmail.com wrote: > > hello: > > > I recently compiled a numerically intensive c project under cygwin gcc > > 3.4.4 and microsoft visual c. The platform is intel T2400 1.83 ghz > > dual core lap top. > > > the numerical stuff is both floating point and integer intensive > > > The gcc optimized (-O3) vs non optimized improved the performance 30 % > > The more you go with higher optimizations, the slower > it goes. Use -O2. > > > visual c optimized (standard , check 'release; under visual c 2005) > > vs non optimized ('build') was a whopping 8x performance gain > > This is because the non optimized version injects a lot of > checking code to avoid bugs. It is slower than strictly necessary. > For instance they check at function exit if there wasn't a stack overwrite.. > > > but the most surprising thing was visual c optimized was 2x > > performance over gcc optimized. > > Intel compiler is even better than Microsoft. It is the best compiler > for the intel architecture. Period. > > > is anybody else seeing the same thing. if this is true microsoft c > > compiler is in a different league altogether > > Obviously Microsoft leaves gcc far behind, and I have been seeing this > since at least 8-9 years. > > > i was not successful so far compiling under mingw. will it make dent ? > > 2x is hard to overcome > > mingw is just gcc using Microsoft run time library. Do not expect > anything better/worst. > > It is not surprising that gcc is slower than Microsoft since the > people behind each project have vastly different objectives and > budgets to implement them. > > Gcc is running in many platforms and architectures. > Microsoft is running in one platform exclusively. > > Gcc implements standards like C99 (module small problems), Microsoft > implements only Microsoft environments (.net, etc). Microsoft is > still at C89 level. > > -- > jacob navia > jacob at jacob point remcomp point fr > logiciels/informatiquehttp://www.cs.virginia.edu/~lcc-win32 the problem is in my type of product i have to recommend windows platform because based on gcc performance an apple to apple linux platform will run 2x slower |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
On Fri, 09 May 2008 14:03:14 -0700, kumarchi wrote:
> On May 9, 4:20Âpm, jacob navia <ja...@nospam.com> wrote: >> kumar...@gmail.com wrote: >> > hello: >> >> > I recently compiled a numerically intensive c project under cygwin >> > gcc 3.4.4 and microsoft visual c. The platform is intel T2400 1.83 >> > ghz dual core lap top. >> >> > the numerical stuff is both floating point and integer intensive >> >> > The gcc optimized (-O3) vs non optimized improved the performance 30 >> > % >> >> The more you go with higher optimizations, the slower it goes. Use -O2. >> >> > visual c optimized (standard , check 'release; under visual c 2005) >> > vs non optimized ('build') was a whopping 8x performance gain >> >> This is because the non optimized version injects a lot of checking >> code to avoid bugs. It is slower than strictly necessary. For instance >> they check at function exit if there wasn't a stack overwrite. >> >> > but the most surprising thing was visual c optimized was 2x >> > performance over gcc optimized. >> Obviously Microsoft leaves gcc far behind, and I have been seeing this >> since at least 8-9 years. >> >> > i was not successful so far compiling under mingw. will it make dent >> > ? 2x is hard to overcome >> > the problem is in my type of product i have to recommend windows > platform because based on gcc performance an apple to apple linux > platform will run 2x slower Did you enable the -march=cpu-type -msse[2] code generation option ? HTH, AvK |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
kumarchi@gmail.com wrote:
> > the problem is in my type of product i have to recommend windows > platform because based on gcc performance an apple to apple linux > platform will run 2x slower Then try the Intel compiler, which is also cross platform. -- Ian Collins. |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
kumarchi@gmail.com wrote:
> > the problem is in my type of product i have to recommend windows > platform because based on gcc performance an apple to apple linux > platform will run 2x slower You can use Intel compiler under linux. Your code will be faster than under windows/MSVC. Of course do not tell your customers about Intel/Windows. :-) -- jacob navia jacob at jacob point remcomp point fr logiciels/informatique http://www.cs.virginia.edu/~lcc-win32 |
|
![]() |
| Outils de la discussion | |
|
|