Control!

This is a draft

(My main target audience of this post is myself! But I think it can be useful for others, too. I'm summarizing what I've learnt about the importance of control in the process of achieveing a high-performance system. I just compiled together what I've learnt from others.)

Control is the thing that we should worry about.

Without having full control over a system, how can we be sure about the performance or security of that?!

Chandler Carruth is RIGHT! The reason that people use C or C++ programming languages or even assembly language is not the performance, it's the CONTROL. (See this talk).

C or C++ don't give you high-performance automagically; they enable you to write high-performance code. You can easily write a terrible low-performance code in C or C++. It's up to YOU, and that's the point!

One may argue, isn't it better to offload the hard work to the experts and use their well-designed and fine-tuned black boxes?

I'd say no! Experts are not there to solve OUR problems :) They're solving their own problems; we can watch them and study their works to learn how to solve a problem, and when appropriate, apply their solutions to our problems. They are a great source of inspiration and learning. They teach us how to think, how to solve problems, they give us useful tools, but they cannot think for us, they cannot understand for us. That's our responsibility!

And one could not achieve performance by composing black boxes. Performance can be achieved by studying, measuring and modifying the components of the system.

For sure, we have different levels of performance. We're striving for highest performance according to the budget (time, money, etc.). E.g., most of the time using a general-purpose memory allocator is good enough, but sometimes it's not! Simply because you have a much better understanding of how you're using memory in your application, than those smart people who wrote the general-purpose memory allocator.

Of course, abstractions and black boxes are tremendously useful. But there are different levels of abstraction. We should be able to change the level of abstraction and go deeper, when we need to do so. It should be possible to see under the hood.

References