On Thu, 2017-03-23, bitrex wrote:
> On 03/23/2017 05:36 AM, Bo Persson wrote:
>> On 2017-03-23 04:47, bitrex wrote:
>>> My main struggle with learning C++1x coming from languages like straight
>>> C and Python is that I might have what I think is a good idea for a
>>> particular software design, but then while attempting to implement it I
>>> find myself bogged down for an afternoon in Stack Overflow posts about
>>> the particulars of performance issues in the "copy and swap" idiom and
>>> blog debates about whether the constructor of a superclass should be
>>> inherited this way or that and I look at my code and ask myself "Um,
>>> will any of this stuff I just did perform well in practice or even
>>> idiomatic or 'correct' in any way at all?
>>>
>>
>> Start with the 'correct' part. If the program doesn't do what it is
>> supposed to, it doesn't matter how fast it is.
>>
>> And most parts of a program (97%?) are not important performance-wise.
>> Like if you create an object once in a program, how fast does the
>> constructor need to be?
>>
>> Just wait until you see that some parts are not fast enough, and then
>> look for possible optimizations there. And only there.
>>
>> Remember:
>>
>> "Premature optimization is the root of all evil" (Donald Knuth)
>>
>>
https://en.wikiquote.org/wiki/Donald_Knuth#Quotes_about_Donald_Knuth
>
> Got it. I've been using Code::Blocks on Linux, the current version comes
> with Valgrind already plugged-in, are there any recommended profiling
> tools for that setup?
your focus. And IMHO, it shouldn't be.
// Jorgen Grahn <grahn@ Oo o. . .