[Bf-committers] Optimization flags. Even speedier blender.
Robert Wenzlaff
bf-committers@blender.org
Thu, 20 Nov 2003 01:35:17 -0500
I know we need to stick with 1 set that will work for all the platforms for
the official release.
But as an interesting side note, I found that setting the following gcc flags
gave me about a 30% speed boost in rendering:
-march=athlon-xp -msse -mfpmath=sse
(Average of 3 renders of blacksmith.blend:
standard flags: Old render: 23.11s, Unified: 29.23s
modified flags: Old render: 17.68s, Unified: 25.41s )
It's like a free CPU upgrade. Overclocking without the smell of burning
fiberglass...
The -mmmx and -m3dnow flags did next to nothing.
Going from -O2 to -O3 slowed the old renderer down just a bit, but sped the
unified renderer up. (Probably broke a few other things, though I only
noticed the ones already known broken by -O2 with my gcc rev - I'd love to
see the list of reasons that lead to -O2).
The speed difference between -O2 and -O1 was about 2-3% with with the standard
switches, but 4-5% with the -march, -msse, and -mfpmath flags set as above.
No switch gave and significant change to my draw times, but I have a rather
speedy accelerated gfx card, so the CPU probably has very little influence
there.
I guess to be fully sure I didn't break anything, I'd have to wait for the
regression suite. I think I'll run highly optimized for a while and start
making a list.
Maybe this is the topic for an article for the do-it-yourselfers out there.
And autoconf can certainly detect some of this and set the right flags.
--
********************************************
Robert Wenzlaff rwenzlaff@soylent-green.com