Fantastic exchange from DConf
Dmitry Olshansky via Digitalmars-d
digitalmars-d at puremagic.com
Wed May 10 03:53:17 PDT 2017
On 5/10/17 8:28 AM, H. S. Teoh via Digitalmars-d wrote:
>> C++'s fundamental paradigm has always been "Premature-optimization
>> oriented programming". C++ promotes POOP.
>
> LOL!!
>
> Perhaps I'm just being cynical, but my current unfounded hypothesis is
> that the majority of C/C++ programmers don't use a profiler, and don't
> *want* to use a profiler, because they're either ignorant that such
> things exist (unlikely), or they're too dang proud to admit that their
> painfully-accumulated preconceptions about optimization might possibly
> be wrong.
>
> Or maybe my perceptions are just heavily colored by the supposedly
> "expert" C coders I've met, who wrote supposedly better code that I
> eventually realized was actually not better, but in many ways actually
> worse -- less readable, less maintainable, more error-prone to write,
> and at the end of the day arguably less performant because it ultimately
> led to far too much boilerplate and other sources of code bloat,
> excessive string copying, too much indirection (cache unfriendliness),
> and other such symptoms that C coders often overlook.
Just to add a different perspective - the people I work with is the kind
of guys who know when not to trust the profiler and what to try if the
profile is flat. There is no question raised that you should run it,
it's just assumed you always do.
P.S. Can't wait to see "Are we fast yet?" graph for Phobos functions.
---
Dmitry Olshansky
More information about the Digitalmars-d
mailing list