DEV Community

Valentin Silvestre
Valentin Silvestre

Posted on

1 1

What's more important on C++ to have a great performance?

Multi-host, multi-process, multithread?
(My case is a crypto miner for courses that don't use GPU... And I have troubles finding information !)

Top comments (1)

Collapse
 
noah11012 profile image
Noah11012 • Edited

One of the things about C++ that draws me towards it is that I can write high-level code while not giving up efficiency. This is called the zero-overhead principle. What you don't use, you don't pay for in terms of overhead. C++ also has a large collection of tools that you get for free. Including in this tool set is the The Standard Template Library (STL) which is a rich collection of containers that help you as a programmer write better code. In C, you don't get this. You either have to create a container yourself or find a library that someone else has written that fulfills your needs.

This isn't to say that C++ is completely faultless. One example is templates: templates are there so that you can write generic code. However, if you get a template error(s), they are hard to read and diagnosis.

With all that being said, C++ is my language of choice because of efficiency, the ability to write higher-level code, and expressiveness.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay