How much do you worry about the performance of the code that you write?

How much do you worry about the performance of the code that you write?

Autistically too much, to the point where I stopped programming for a living and went back to my math studies

Not much, all my projects don't require a lot of performance, but secure and easy to read code is a must.

Not at all I just compile it with -Ofast

I don't. I just work when I am at work.
And chill when I get home.

I don't worry about performance, memory size, or even security.

t. JavaScript programmer

Seems like a lot more people worry about the performance of the code they run rather then of the one they write.

I'm basically making shovelware.
speed of development > code readability / reusability > optimization

some general on-the-fly reasoning about algorithmic runtimes if there is some more complex stuff involved, but i don't precisely calculate it but just estimate based on my experience. Other than that, not much, but i am autistic when it comes to fixing compiler warnings

Only if the entire program is built around a single function, I only make small programs anyway so as long as it isn't freezing it's usually fine.

Quite a lot. I do scientific simulations which can take months to complete with single core. Of course it is serialized but saved 10-30% BU can be used to do other work. Also it saves the planet to not run BS code :)

So this is the big-O notation people always talk about...

Big O notation goes like something like O(1), O(n), O(log n) etc.
That refers to the complexity of a function, based on the dataset it acts upon. If some dataset is twice as large, an O(1) function will take the same time to act upon it, whereas the execution time at O(n) will be linearly proportional to the size of the dataset and thus be twice as slow with a dataset that is twice as large.

What that user is talking about is not that kind of O complexity. When you compile (turn source code into machine code), the compiler software can make optimizations to make the code run faster. There are many different techniques for this, and certain techniques are enabled at different optimization levels. O0 (O zero) is the default and means no optimization. O2 is the sane level of optimization, and things like O3 and Ofast go all out and try to be super smart about how they turn source code into efficient machine code.

If its a case where performance really matters, maybe. In general I care more about code structure

it was a joke dude

I start with choosing fast language. The "slow" shifted over time thanks to Python and Ruby, I'm quite thankful for this because Go and Java now appear as fast and I don't have to touch C/C++.
I sometimes pass O(n^2) solution even if I know O(n*log n) exists (or O(n) over O(log n)) when I know it will only run on small samples.
I always prefer clarity over obfuscating micro-optimizations.
>"In established engineering disciplines a 12% improvement, easily obtained, is never considered marginal and I believe the same viewpoint should prevail in software engineering"
And just overall prefer optimizing code with bigger runtime.

too damn much

too much, I only use C or C++ for everything except tiny little scripts

FTFY

I strive for my programs to run as well as possible. I get to the point where I'll rewrite something a few ways and benchmark them to see which to use.

not at all
t. python dev that is 10x as productive as the average C pleb Sup Forums codemonkey