logoalt Hacker News

cardanomeyesterday at 1:43 PM5 repliesview on HN

For release builds yes. For debug builds slow compile times kill productivity.


Replies

greener_grassyesterday at 1:50 PM

If you are not willing to make this trade then how much of a priority was run-time performance, really?

show 2 replies
torginusyesterday at 3:00 PM

A lot of C++ devs advocate for simple replacements for the STL that do not rely too much on zero-cost abstractions. That way you can have small binaries, fast compiles, and make a fast-debug kinda build where you only turn on a few optimizations.

That way you can get most of the speed of the Release version, with a fairly good chance of getting usable debug info.

A huge issue with C++ debug builds is the resulting executables are unusably slow, because the zero-cost abstractions are not zero cost in debug builds.

show 1 reply
arw0nyesterday at 3:14 PM

I think this also massively depends on your domain, familiarity with the code base and style of programming.

I've changed my approach significantly over time on how I debug (probably in part due to Rusts slower compile times), and usually get away with 2-3 compiles to fix a bug, but spend more time reasoning about the code.

kace91yesterday at 1:58 PM

Doesn’t rust have incremental builds to speed up debug compilation? How slow are we talking here?

show 2 replies
therealdkzyesterday at 1:57 PM

[dead]