On 18/09/11 8:59 AM, Marco Leise wrote:
Am 17.09.2011, 22:33 Uhr, schrieb Peter Alexander
<[email protected]>:
On 17/09/11 7:52 PM, Marco Leise wrote:
Am 17.09.2011, 20:01 Uhr, schrieb Adam D. Ruppe
<[email protected]>:
Ah, that explains it. I usually don't use the -O switch.
During development when you recompile several times an hour, you really
don't need -O either. For my hobby projects I usually set up the IDE
with a compile command without -O and place a Makefile in the directory
that has optimizations enabled. Sure, there are times when you run
performance tests, but they aren't the usual case, so I think it is fair
to compare compiles without optimizations in this context.
I suppose that's true for most people, but not for games developers.
When testing changes, you need the game to be running at interactive
framerates, and it's very difficult to achieve that in a debug build,
so we generally always run optimized, and just use MSVC++'s #pramga
optimize(off, "") directive to unoptimize specific sections of code
for debugging.
To be fair, my hobby project still runs fast without optimizations,
but I definitely need to repeatedly compile with optimizations on when
performance tuning.
May I ask how much slower the frame rate is with the debug build? I
would think of certain modules like physics or vegetation to be in
precompiled external libraries (or do you use source code versions?) and
the graphic card doing a lot of work.
My D project is between 1.5 and 2.0x slower in debug builds vs. release.
At work it's about 4x slower on consoles in full debug vs. full opt and
3x slower vs. partial optimisation.
Also I remember when some game
developer said a while back "we are not cpu bound at all". Has that
changed again? Or is it maybe because your project has not been
optimized yet? Or is it simply that you are developing for the next
generation of hardware?
It depends on the game, and of course what settings the player is
playing at. Playing at lowest graphics fidelity you will probably always
be CPU bound and at highest fidelity you will always be GPU bound.
My definition of interactive frame rate starts at ~20 FPS I guess,
sounds like it would be easy to achieve. Then again the only game I ever
finished was a random maze pac man clone with 16 colors Windows .ico
graphics *g*
Well most consoles games run at 30fps these days, so for debug builds
you are often dropping below 20, or even 10 fps. It's not just the frame
rate either, we have a lot of assets to load in and they all take longer
to load in non-optimized builds, which increases the time it takes to
iterate on changes.