Author Topic: C::B with DM or vc++?  (Read 18676 times)

Offline Trikko

  • Multiple posting newcomer
  • *
  • Posts: 82
    • e-nuts.net
C::B with DM or vc++?
« on: February 22, 2006, 01:51:41 pm »
I've done several test with wxwidgets and other libs (f.e. antigrain) to test compiler performances. It seems that gcc it's slow to compile, make big exes and they are poorly optimized. For example on antigrain benchmark gcc is 4/5 times slower than dmc and vc++... I know you use mingw to improve performace, but i wonder if anyone have tried to compile it with other compilers...
A. Fontana
My homepage
Do you need custom software? Do you want to work as freelancer?

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: C::B with DM or vc++?
« Reply #1 on: February 22, 2006, 01:59:33 pm »
It seems that gcc it's slow to compile, make big exes and they are poorly optimized.
Yes to first (but it's improved a lot with GCC4), yes to second (but only win32, MinGW32 linker's fault), and the third, YMMV.

I know you use mingw to improve performace, but i wonder if anyone have tried to compile it with other compilers...
AFAIK it's not used to improve performance, it's used because it's the most common and portable opensource compiler.

i wonder if anyone have tried to compile it with other compilers...
Yes, Sam got it working with MSVC, but I don't know if he made patches or if the patches are applied on SVN.
I don't know about DMars, but if any errors, it's most probably because DLLEXPORT and those kind of things.


Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4305
    • Code::Blocks IDE
Re: C::B with DM or vc++?
« Reply #2 on: February 22, 2006, 02:04:41 pm »
I know you use mingw to improve performace, but i wonder if anyone have tried to compile it with other compilers...

AFAIK some people have tried. The results, I don't know.
But even if it could succesfully build in other compilers, we 'd still use GCC. This will never change, no matter what.
Here are the reasons:

  • C::B is cross-platform and the only reliable cross-platform compiler available is GCC.
  • I don't have MSVS nor have I ever used/seen it. I don't plan to change this now.
  • The above point makes clear that even if someone contributed a patch for other compilers to build C::B, it wouldn't be accepted because we couldn't maintain it (been there, done that).

With that said, you should really learn how to use the available optimization options for GCC. GCC generated executables are not slower than MSVS's nor DM's.

Quote
antigrain benchmark gcc is 4/5 times slower

I 'd like to see some facts please.
I can tell you it's 3 times faster but if I don't show you the facts, it's not worth anything...
Be patient!
This bug will be fixed soon...

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: C::B with DM or vc++?
« Reply #3 on: February 22, 2006, 02:30:47 pm »
Trikko: C::B is buildable with other compilers like MSVC. But it will never be distributed as is in official builds.

It will happen like Firefox development: The official builds are always built with GCC, and Unofficial, Nightly builds are most of times built with MSVC2005, or other compilers, often for optimization purposes.

Sam got C::B compiling on MSVC here: http://forums.codeblocks.org/index.php?topic=2085.0

Hope that answer your questions.

Offline Trikko

  • Multiple posting newcomer
  • *
  • Posts: 82
    • e-nuts.net
Re: C::B with DM or vc++?
« Reply #4 on: February 22, 2006, 07:42:36 pm »
bauhauah what an idiot i am... i mean "to improve portability" (becase gcc is the same compiler on many platform) :D
A. Fontana
My homepage
Do you need custom software? Do you want to work as freelancer?

Offline grunerite

  • Multiple posting newcomer
  • *
  • Posts: 41
Re: C::B with DM or vc++?
« Reply #5 on: February 22, 2006, 08:05:03 pm »
GCC generated executables are not slower than MSVS's nor DM's.
Hey,

I've been looking for some good #'s that show this. I tend to agree with you, at least at face value I see no difference in execution speed, responsiveness to resizing windows of apps, etc. But, I'd like to find some real data that shows this, to convince some others this is the case.

Do you have any references for this statement, because I can't find any good test comparisons?
Cheers

Offline Trikko

  • Multiple posting newcomer
  • *
  • Posts: 82
    • e-nuts.net
Re: C::B with DM or vc++?
« Reply #6 on: February 22, 2006, 08:14:49 pm »
I 'd like to see some facts please.
I can tell you it's 3 times faster but if I don't show you the facts, it's not worth anything...

About compile time: try to compile wxWidgets.
About performance and antigrain. I was referring to an example included with antigrain distro.
It's a simple benchmark with some performance value about drawing line points ecc, not really a good one for a compiler, but it could give you an idea. On my machine f.e. first value is 60k/s (points) for digital mars, 40/s for visual c++ and 10kb/s (!) for mingw. I have no more mingw installed so i can't compile it but i remember the value... (and i have a bug with C::B that tells me it can't found mingw-g++ ...) If you don't trust me, you can do some test by yourself.

I tried it also with many other example, with my simple wxapp difference is small, but in some case you can taste it (usually in frame loading time and complex operations...). I think that in codeblocks this difference could be bigger.

By the way it's just an opinion. Maybe i'm wrong about it.  In this case don't worry and go on compiling this fantastic ide with mingw! :)

A. Fontana
A. Fontana
My homepage
Do you need custom software? Do you want to work as freelancer?

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: C::B with DM or vc++?
« Reply #7 on: February 22, 2006, 09:05:10 pm »
Do you have any references for this statement, because I can't find any good test comparisons?

An example is the fact that all windows unofficial builders of Firefox uses MSVC compiler. I can say that those unofficial builds makes Firefox a lot faster, and there are benchmarks about it (JavaScript benchs, loading of images, etc). The app feels a lot more responsive also.

But I think we shouldn't start a compiler1 vs. compiler2 thing.

I think the only real truth is that no one compiler is overall better than other. Each one haves their own strenghts.
Nothing stops you to use more than one, and experience tells that it leads to more better and portable code (some compilers don't bail out, were others does).

Offline Trikko

  • Multiple posting newcomer
  • *
  • Posts: 82
    • e-nuts.net
Re: C::B with DM or vc++?
« Reply #8 on: February 22, 2006, 10:02:24 pm »
For example i think it could be useful for codecompletition that takes a lot to parse all wxWidgets classes... (but it's really useful).

About CodeCompletition i have a simil bug report. When popup tips window appear Managment pane, Open file list pane, menu bar, status bar and icons on toolbar blink... Message pane and main tabbed window does not. Is it possible to correct these blinks/flicks?

A. Fontana
A. Fontana
My homepage
Do you need custom software? Do you want to work as freelancer?

Offline NeXuS

  • Single posting newcomer
  • *
  • Posts: 6
Re: C::B with DM or vc++?
« Reply #9 on: February 23, 2006, 01:36:53 pm »
I've done several test with wxwidgets and other libs (f.e. antigrain) to test compiler performances. It seems that gcc it's slow to compile, make big exes and they are poorly optimized. For example on antigrain benchmark gcc is 4/5 times slower than dmc and vc++... I know you use mingw to improve performace, but i wonder if anyone have tried to compile it with other compilers...

In my very humble opinion and to my experience only the statement on file sieze is true.
I am currently using both VS 2006 and Codeblocks with mingw:
- Compile times are faster with mingw than MS compiler (it's just my feeling, I don't have exact times for MS compiler but I think it's kind of slower
- Execution times, when code is compiled with proper optimizations, it almost the same. Depending on the instruction mix sometimes mingw produces faster code, other times MS compiler works better.
- Executables are indeed a little bit fatter when produced with mingw


This is just my two euro cents of wisdom.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: C::B with DM or vc++?
« Reply #10 on: February 23, 2006, 03:03:53 pm »
This is just my two euro cents of wisdom.
And it's perfectly true :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Trikko

  • Multiple posting newcomer
  • *
  • Posts: 82
    • e-nuts.net
Re: C::B with DM or vc++?
« Reply #11 on: February 23, 2006, 04:48:33 pm »
http://www.osnews.com/img/5602/results.jpg  <-- watch this benchmark about math
http://biolpc22.york.ac.uk/wx/wxhatch/wxMSW_Compiler_choice.html <-- a quite old test with wxwidgets

There are many other example. You can try it by yourself... Where can i find an unofficial vc or dm build of C::B? :)
A. Fontana
My homepage
Do you need custom software? Do you want to work as freelancer?

Offline takeshi miya

  • Lives here!
  • ****
  • Posts: 1487
Re: C::B with DM or vc++?
« Reply #12 on: February 23, 2006, 04:59:42 pm »
http://biolpc22.york.ac.uk/wx/wxhatch/wxMSW_Compiler_choice.html <-- a quite old test with wxwidgets
I have to say that those wxWidgets benchmarks are true, I've tested myself, and DMars is 20x times faster than GCC3 in compilation time. YMMV.
As a note, DMars linker is purely written in assembler, and the compiler got lot's of parts also.

It would be good to benchmark GCC4 too, as for sure it comes closer with the new AST optimizations.

There are many other example. You can try it by yourself... Where can i find an unofficial vc or dm build of C::B? :)

Ask Sam, as I've said above, he got it compiling :D
« Last Edit: February 23, 2006, 05:04:40 pm by Takeshi Miya »

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: C::B with DM or vc++?
« Reply #13 on: February 23, 2006, 05:05:57 pm »
http://www.osnews.com/img/5602/results.jpg  <-- watch this benchmark about math
http://biolpc22.york.ac.uk/wx/wxhatch/wxMSW_Compiler_choice.html <-- a quite old test with wxwidgets

The GCC used is old. Now we are quite (or already) at GCC 4.1.0. The benchmarks should be re-done :D.

Anyway, have a look at here.

There are many other example. You can try it by yourself... Where can i find an unofficial vc or dm build of C::B? :)

I am not sure that such unofficial builds of C::B exists. May be as Takeshi Miya said, Sam has done one. You can always try to build SVN sources by yourself and share your results :).

Best wishes,
Michael

Offline Trikko

  • Multiple posting newcomer
  • *
  • Posts: 82
    • e-nuts.net
Re: C::B with DM or vc++?
« Reply #14 on: February 23, 2006, 05:07:29 pm »

Ask Sam, as I've said above, he got it compiling :D


Where is he? Give me his homepage! :D

Source from svn does not compile with other compilers... they need a patch... It could be useful to compile it with more compilers: in this way code become more "portable" :)

A. Fontana
My homepage
Do you need custom software? Do you want to work as freelancer?