Hacker News new | ask | show | jobs
by htfy96 1044 days ago
It depends. O0 turns off a few trimming optimizations and could potentially causes more information (code or DWARF) to be included in the objects, which may eventually slow down the compilation. In our large code base, we found that -O1 works best in terms of compilation speed.
1 comments

Yeah, -O1 is usually a good choice. I get the occasional <value optimized out> while debugging, well I add another logging statement and rerun.