Hello,
I've seen comments raised by Dmitry [1] about debugging flags adding
runtime overhead, and favouring enums that can be switched at compile
time rather than branches in the hot path at run time.
I'm torn on this issue because while I do love things to be fast, I
think serviceability of the Go runtime is an issue which needs more
attention and having these options compiled out makes it harder for
people to solve their own problems, especially as Go is starting to
make some inroads in being packaged in the major OS distributions.
While I suspect it won't be popular, I'd like to propose a single
release/debug flag which gates these new GODEBUG options. The builders
would always build in debug mode, and probably the builds released
from the release branch would build in release mode.
Thoughts ?
Cheers
Dave
[1]
https://codereview.appspot.com/21990045/ and others