Neither language is better, neither language is faster. There are good reasons for using both languages:
?inline
✅ relatively low-level language
✅ much simpler language (no classes, templates, ...)
✅ portable to a wide variety of systems
?inline
✅ lots of helpful abstractions (classes, templates, ...)
✅ feature-rich language (function overloads, constexpr
, ...)
✅ extensive standard library
Neither language is inherently faster than the other. In modern compilers, the exact same optimizer is used for both languages. Certain high-level C++ features can make it easy to inadvertently write inefficient code (e.g. innocent looking code performing large copies).
One notable difference between the two languages is their standard libraries' string representation: C strings, while simple, are highly inefficient.
Both languages can be equally fast, choose the right language for your job, and the language you enjoy working in.