Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #86659 > unrolled thread

"the sad state of debug performance in c++" by Vittorio Romeo

Started byLynn McGuire <lynnmcguire5@gmail.com>
First post2022-09-27 17:12 -0500
Last post2022-09-28 17:22 +0100
Articles 4 — 4 participants

Back to article view | Back to comp.lang.c++


Contents

  "the sad state of debug performance in c++" by Vittorio Romeo Lynn McGuire <lynnmcguire5@gmail.com> - 2022-09-27 17:12 -0500
    Re: "the sad state of debug performance in c++" by Vittorio Romeo Manfred <noname@add.invalid> - 2022-09-28 05:40 +0200
    Re: "the sad state of debug performance in c++" by Vittorio Romeo Juha Nieminen <nospam@thanks.invalid> - 2022-09-28 05:44 +0000
    Re: "the sad state of debug performance in c++" by Vittorio Romeo Mr Flibble <flibble@reddwarf.jmc.corp> - 2022-09-28 17:22 +0100

#86659 — "the sad state of debug performance in c++" by Vittorio Romeo

FromLynn McGuire <lynnmcguire5@gmail.com>
Date2022-09-27 17:12 -0500
Subject"the sad state of debug performance in c++" by Vittorio Romeo
Message-ID<tgvsfq$5bec$3@dont-email.me>
"the sad state of debug performance in c++" by Vittorio Romeo
    https://vittorioromeo.info/index/blog/debug_performance_cpp.html

"By now, it should (hopefully) be common knowledge that the term “zero 
cost abstraction” is a lie. To be fair, it’s more of a misnomer – had 
the term been “abstraction likely to result in zero runtime overhead 
after optimizations” then it would have been much more honest, but I can 
see why that didn’t fly…"

"Most C++ developers tend to accept the fact that “zero cost 
abstractions” provide zero runtime overhead only with optimizations 
enabled, and that they have a negative impact on compilation speed. The 
same developers tend to believe that the benefits of such abstractions 
are so valuable that having your program perform poorly in debug mode 
(i.e. without optimizations enabled) and compile more slowly is worth it."

"I used to be one of them."

He is not wrong.

Lynn

[toc] | [next] | [standalone]


#86662

FromManfred <noname@add.invalid>
Date2022-09-28 05:40 +0200
Message-ID<th0fn6$4bl$1@gioia.aioe.org>
In reply to#86659
On 9/28/2022 12:12 AM, Lynn McGuire wrote:
> "the sad state of debug performance in c++" by Vittorio Romeo
>     https://vittorioromeo.info/index/blog/debug_performance_cpp.html
> 
> "By now, it should (hopefully) be common knowledge that the term “zero 
> cost abstraction” is a lie. To be fair, it’s more of a misnomer – had 
> the term been “abstraction likely to result in zero runtime overhead 
> after optimizations” then it would have been much more honest, but I can 
> see why that didn’t fly…"
> 
> "Most C++ developers tend to accept the fact that “zero cost 
> abstractions” provide zero runtime overhead only with optimizations 
> enabled, and that they have a negative impact on compilation speed. The 
> same developers tend to believe that the benefits of such abstractions 
> are so valuable that having your program perform poorly in debug mode 
> (i.e. without optimizations enabled) and compile more slowly is worth it."
> 
> "I used to be one of them."
> 
> He is not wrong.
> 
> Lynn
> 
> 

The point still stands.
The author's assumption is that debug mode == no optimizations. That's 
not the case.

[toc] | [prev] | [next] | [standalone]


#86664

FromJuha Nieminen <nospam@thanks.invalid>
Date2022-09-28 05:44 +0000
Message-ID<th0n0h$1u3f$1@gioia.aioe.org>
In reply to#86659
Lynn McGuire <lynnmcguire5@gmail.com> wrote:
> "the sad state of debug performance in c++" by Vittorio Romeo
>    https://vittorioromeo.info/index/blog/debug_performance_cpp.html
> 
> "By now, it should (hopefully) be common knowledge that the term ???zero 
> cost abstraction??? is a lie. To be fair, it???s more of a misnomer ??? had 
> the term been ???abstraction likely to result in zero runtime overhead 
> after optimizations??? then it would have been much more honest, but I can 
> see why that didn???t fly???"
> 
> "Most C++ developers tend to accept the fact that ???zero cost 
> abstractions??? provide zero runtime overhead only with optimizations 
> enabled, and that they have a negative impact on compilation speed. The 
> same developers tend to believe that the benefits of such abstractions 
> are so valuable that having your program perform poorly in debug mode 
> (i.e. without optimizations enabled) and compile more slowly is worth it."
> 
> "I used to be one of them."

"When I don't use compiler optimizations the program is slower."

Well, duh. What exactly is he expecting?

(And as has been pointed out, debugging and optimizations are not a
mutually exclusive thing. Nothing stops you from specifying optimization
flags *and* debugging flags at the same time.)

[toc] | [prev] | [next] | [standalone]


#86684

FromMr Flibble <flibble@reddwarf.jmc.corp>
Date2022-09-28 17:22 +0100
Message-ID<20220928172233.00007a97@reddwarf.jmc.corp>
In reply to#86659
On Tue, 27 Sep 2022 17:12:10 -0500
Lynn McGuire <lynnmcguire5@gmail.com> wrote:

> "the sad state of debug performance in c++" by Vittorio Romeo
>     https://vittorioromeo.info/index/blog/debug_performance_cpp.html
> 
> "By now, it should (hopefully) be common knowledge that the term
> “zero cost abstraction” is a lie. To be fair, it’s more of a misnomer
> – had the term been “abstraction likely to result in zero runtime
> overhead after optimizations” then it would have been much more
> honest, but I can see why that didn’t fly…"
> 
> "Most C++ developers tend to accept the fact that “zero cost 
> abstractions” provide zero runtime overhead only with optimizations 
> enabled, and that they have a negative impact on compilation speed.
> The same developers tend to believe that the benefits of such
> abstractions are so valuable that having your program perform poorly
> in debug mode (i.e. without optimizations enabled) and compile more
> slowly is worth it."
> 
> "I used to be one of them."
> 
> He is not wrong.

He is wrong, and so are you.

/Flibble

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c++


csiph-web