back

by Narishma·12y ago·view on hn ↗
Your projects aren't video games, are they? It's not very feasible to debug games at -O0, unless they're very small. And I don't how if profile guided optimization is feasible either.
2 comments
I've worked on several AAA games and have never had a problem running/testing/debugging with optimizations off. There's a framerate hit, of course, but I've never had a problem debugging because of it. Trying to debug with optimizations on is usually a bigger time sink than just debugging at 20fps. When I'm dealing with gameplay code and not engine code I'll normally just build with all optimizations on except -O0 the gameplay modules so I get full framerate and perfect debugging of the code I'm interested in. But usually that's not necessary (except it gives me faster load/restart times.)
I've worked in large projects where the build of the entire project (c++ of course) took around 75 minutes, and performance was important (real time visualization of volumetric data).

It happened to me _very_ rarely to change a global header that would cause a massive rebuild. Most of the time I would rebuild just the current object I was working on, taking anywhere from 10 to 60 seconds.

Yet, linking took massively longer (around 4 minutes as I recall).