4 ms·
The overwhelming majority of programs have no particular performance requirement; whatever is most convenient is fast enough. That might mean writing in a scrip
by ncmncm 5y ago
The overwhelming majority of programs have no particular performance requirement; whatever is most convenient is fast enough. That might mean writing in a scripting language, even bash.
Of the rest, the overwhelming majority of what most programs do has no particular performance requirement, so whatever is most convenient is fast enough. Usually only a small kernel of the program needs any attention to performance.
In such kernels, the overwhelming majority yield to very ordinary techniques, because (e.g.) they build their structures at startup, and just use them afterward, or only allocate occasionally.
The few remaining cases demand that you be smart, and make full use of the flexibility and power of the language and environment. If the language is not up to the job, you're stuck.
Going straight to mmapping hugetlb pages is a rookie mistake. Failing to mmap storage when the problem calls for it is another.
C++ and Rust are distinguished by supporting development at all of these levels. "Modern C++" does not imply confining yourself to any of them. A mature programmer uses the tools at hand as needed to meet requirements, without wasting time and without agonizing over ideology. Rust offers no advantage over C++ in this.