POV-Ray : Newsgroups : povray.general : Compiling with optimizations? : Re: Compiling with optimizations? Server Time
31 Jul 2024 14:29:40 EDT (-0400)
  Re: Compiling with optimizations?  
From: Stefan Viljoen
Date: 28 Dec 2006 01:31:56
Message: <459364db@news.povray.org>
space_cadet wrote:

> I suspect the binary distribution of povray (linux) is compiled without
> optimizations. (correct?)

I think it IS compiled with optimizations - it is highly unlikely not to be.
Why don't you ask in the povray.unix forum? Nicolas Calimet (I think)
should be able to give you a detailed answer.
 
> My question is if I rebuild and compile with optimizations from source,
> will that give me a noticeable performance speedup? Has anybody noticed
> significant speedup this way?

I've tried compiling on the IA32 architecture with a 2.6.14.3 kernel with
GCC 3.4 with the following compiler flags:

-O3 -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing 
-funroll-loops -funroll-all-loops -fforce-addr -finline-functions -frerun-loop-opt 
-falign-loops=4 -falign-jumps=4 -falign-functions=4 -march=i686 -mmmx -msse2

(which may or may not be stupid flags, I just threw a few things in
experimentally to see what happens.)

On a 3GHz P4 HT system with a Gigabyte GA8-TRS350MT motherboard with 1GB of
RAM I could not find any human-perceptible increase in rendering speed over
a stock binary or a self-compiled binary, using GCC. No, I did not time a
run computationally myself, I checked subjectively by checking the timings
at the end of the run on a non-standard scene I designed myself, and
rendered with both binaries. I suspect this is because the raytracing
bottleneck is mostly floating point performance, or how many MFLOPS /
GFLOPS your system can squeeze out.
 
I've heard that is IS possible to get some (not much, apparently)
improvement by using Intel's C compiler instead of GCC. There was a thread
about a year ago about this in the Unix forum, if I remember correctly.

> I've had problems using optimizations on OpenGL code and others as it can
> produce unexpected results with transformations (primarily rotations) on
> different graphics hardware. Could that be a problem here too?

Not as far as I know. Povray doesn't use any accelerated graphics hardware.
It lives in the FPU. Mostly optimisations using GCC should not (mostly)
affected floating point operations. You can just as happily run POV on a
system with an ISA CGA card or on a system with SLIed Nvidia 8800 GTX PCI
Express accelerated cards with 1GB of video RAM each, you'll see no
difference in rendering speed...
 
-- 
Stefan


Post a reply to this message

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