POV-Ray : Newsgroups : povray.programming : Compilation options for MinGW Server Time
22 Dec 2024 17:08:18 EST (-0500)
  Compilation options for MinGW (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: acasta
Subject: Compilation options for MinGW
Date: 28 Jul 2004 04:25:00
Message: <web.4107624feaaac709117bdd960@news.povray.org>
Hello POV Team,

I hope you can give me some hint about this topic...

I've tried to compile PovWin with MinGW 3.3 (gcc 3.2.3).
I had to comment out a couple of functions from pvupdate.cpp (reg_printf and
GetInstallTime) because of error messages complaining about redefinition.
(I didn't try to investigate this more deeply).
After this, I obtained a working pvengine.exe.

Rendering a sample scene with this compiled-by-me version takes about 90'',
while with the official executable rendering time is about 30''!

My compile was done with -O3 option (full optimisation for speed, I think).
I had to add this in the makefile as it was not present in the "release"
build options. Without this the rendering time was even longer.

Now, I know from reading some posts in this group that the POV team uses the
Intel compiler, that produces very fast executables, but a difference of
three times seems a bit strange to me.

Can you tell me whether this is just what you expect from these compilers or
I should adjust optimisation options differently?
Can you give me suggestions about what optimisations I should use?

Thanks in advance,
acasta


Post a reply to this message

From: Christoph Hormann
Subject: Re: Compilation options for MinGW
Date: 28 Jul 2004 04:45:02
Message: <ce7ous$7ub$1@chho.imagico.de>
acasta wrote:
> [...]
> 
> Can you tell me whether this is just what you expect from these compilers or
> I should adjust optimisation options differently?
> Can you give me suggestions about what optimisations I should use?

It is well known that MinGW produces very slow executables.  This is not 
due to the compiler itself though (since on other platforms this is not 
a problem).  On Intel systems you should always make sure you use 
-march=pentium4 (or whatever suits).

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: ABX
Subject: Re: Compilation options for MinGW
Date: 28 Jul 2004 04:54:53
Message: <0tpeg053e5tr9k3a8ni8cckcccomfi992a@4ax.com>
On Wed, 28 Jul 2004 04:22:39 EDT, "acasta" <acastagnini AT yahoo DOT com>
wrote:
> I've tried to compile PovWin with MinGW 3.3 (gcc 3.2.3).
> I had to comment out a couple of functions from pvupdate.cpp (reg_printf and
> GetInstallTime) because of error messages complaining about redefinition.
> (I didn't try to investigate this more deeply).
> After this, I obtained a working pvengine.exe.
>
> Rendering a sample scene with this compiled-by-me version takes about 90'',
> while with the official executable rendering time is about 30''!

What's comparison between rendering times under MinGW GUI and MinGW console
builds ?

> Now, I know from reading some posts in this group that the POV team uses the
> Intel compiler, that produces very fast executables, but a difference of
> three times seems a bit strange to me.

BTW, I did not tried it myself but there is free console version of VisualC
somewhere at Microsoft site. You could optionally try it.

> Can you tell me whether this is just what you expect from these compilers or
> I should adjust optimisation options differently?

The difference in speed is "a little" large but OTOH note POV-Ray is threading
software with exception handling. I do not know how GCC of MinGW handles
threads and exceptions in details but there can be source of difference.

> Can you give me suggestions about what optimisations I should use?

I never focused the optimisations under MinGW but I imagine you could find
some help within povray.unix group since they are more experienced in
optimisations of GCC.

ABX


Post a reply to this message

From: acasta
Subject: Re: Compilation options for MinGW
Date: 28 Jul 2004 11:30:00
Message: <web.4107c572533f1f15117bdd960@news.povray.org>
ABX <abx### [at] abxartpl> wrote:

> > Rendering a sample scene with this compiled-by-me version takes about 90'',
> > while with the official executable rendering time is about 30''!
>
> What's comparison between rendering times under MinGW GUI and MinGW console
> builds ?

There is not much difference (80'' instead of 90'').

> BTW, I did not tried it myself but there is free console version of VisualC
> somewhere at Microsoft site. You could optionally try it.

I'll have a look at it. I also tried with Digital Mars, but I couldn't work
it out (some language compatibility problem, maybe).

> I never focused the optimisations under MinGW but I imagine you could find
> some help within povray.unix group since they are more experienced in
> optimisations of GCC.

OK,
thanks to everyone for your comments.
acasta


Post a reply to this message

From: Lutz-Peter Hooge
Subject: Re: Compilation options for MinGW
Date: 28 Jul 2004 18:25:53
Message: <410827f1@news.povray.org>
Christoph Hormann <chr### [at] gmxde> wrote:

> > Can you tell me whether this is just what you expect from these compilers or
> > I should adjust optimisation options differently?
> > Can you give me suggestions about what optimisations I should use?
> 
> It is well known that MinGW produces very slow executables. 

I can't confirm that.

I compiled Povray (more precise: MegaPov 1.0) with MingGW some time ago (I used 
an older version though, for some reason I couldn't get it to compile with 
recent versions), IIRC the speed difference was less than 10%.

Lutz-Peter


Post a reply to this message

From: Lutz-Peter Hooge
Subject: Re: Compilation options for MinGW
Date: 28 Jul 2004 18:45:58
Message: <41082ca6$1@news.povray.org>
<"acasta" <acastagnini AT yahoo DOT com>> wrote:

> Can you tell me whether this is just what you expect from these compilers or
> I should adjust optimisation options differently?
> Can you give me suggestions about what optimisations I should use?

There shouldn't be such a big difference.

Some results from a couple of winpov binaries I have available:

Chess2.pov, 320x240, no AA
My version (MingW): 39s
My version (BCC5):  55s
MegaPov 1.0 (MSVC): 40s
Povray 3.5 (ICL):   32s

I used these flags with mingw:
-DPRECISION_TIMER_AVAILABLE=0 -ffast-math -fomit-frame-pointer -malign-double
-march=pentium2 -mcpu=athlon-xp -O3 -Wno-multichar -mno-cygwin 
-Wunused-variable -static -mwindows -mno-cygwin

I don't remember wich version of MingW/Gcc version I used, though.

Lutz-Peter


Post a reply to this message

From: ABX
Subject: Re: Compilation options for MinGW
Date: 29 Jul 2004 04:47:19
Message: <96ehg0d40bdpfcdg2ge2ek08j264sop1fc@4ax.com>
On Thu, 29 Jul 2004 00:44:33 +0200, Lutz-Peter Hooge <lpv### [at] gmxde> wrote:
> Chess2.pov, 320x240, no AA
> My version (MingW): 39s
> My version (BCC5):  55s
> MegaPov 1.0 (MSVC): 40s
> Povray 3.5 (ICL):   32s

Is 'My version' related to 3.5 sources? You probably missed frontend/backend
architecture introduced by 3.6 which is a big difference to internal world of
GUI work.

ABX


Post a reply to this message

From: Lutz-Peter Hooge
Subject: Re: Compilation options for MinGW
Date: 29 Jul 2004 07:30:18
Message: <4108dfca$1@news.povray.org>
ABX <abx### [at] abxartpl> wrote:

> Is 'My version' related to 3.5 sources? 

It's basically megapov 1.0 with a few small modifications 
(bicubic interpolation, better png support).

> You probably missed frontend/backend architecture introduced by 3.6
> which is a big difference to internal world of GUI work.

But the problem was rendering performance, not GUI.

Lutz-Peter


Post a reply to this message

From: acasta
Subject: Re: Compilation options for MinGW
Date: 29 Jul 2004 11:20:00
Message: <web.41091558533f1f15117bdd960@news.povray.org>
I've compiled the unix/linux source distribution with the Cygwin environment
and results have been quite different. A summary:

Official povWin binary: about 30''
MinGW binary (GUI): 90''
MinGW binary (console, tried different optimisation options): 80''
Cygwin binary: 47''

I'll try to replicate exactly the same options in MinGW ans see what happens
(but I think most options were the same).

By the way, what compiler is used for the official linux binary?

acasta


Post a reply to this message

From: ABX
Subject: Re: Compilation options for MinGW
Date: 29 Jul 2004 11:53:11
Message: <637ig05n21890etuj9v9kd65esccevb63b@4ax.com>
On Thu, 29 Jul 2004 11:18:48 EDT, "acasta" <acastagnini AT yahoo DOT com>
wrote:
> MinGW binary (console, tried different optimisation options): 80''
> Cygwin binary: 47''

Have you tried to apply the same compiler options from Cygwin build into flags
in makefile dedicated to MinGW build ? That would be worth to compare.

ABX


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.