Tom Kochuyt
Dec 17, 2020

--

Please, please, please stay away from C++, it is a road that very quickly turns to complex unwieldy code, (very) long compile times, hefty code maintenance headaches and general unhappiness.

If you really need the bare metal speed edge (and yes, sometimes you do) then ‘simple’ C will already get you there (actually your example code is essentially just C).

But before you go that route, as another replier shows, some optimization and smart use of the libraries of the scientific stack (written in C and in turn wrapping battle-tested Fortran libraries) can already get you very far, at a lower development & maintenance cost.

And if you find C not sexy, then go for a modern successor of C (Go, Rust, …), anything but C++

--

--

Responses (2)