6 ms·
No, C will be faster because you have more control, in the same way that Assembly will always be faster than C.
by faissaloo 8y ago
No, C will be faster because you have more control, in the same way that Assembly will always be faster than C.
- gmueckl 8y agoC++ allows you to write code that is equally expressive as C. It is no longer true that every valid pice of C is also valid C+++, but the deviations are purely minor syntactical differences. I know no C construct for which a C++ counterpart does not exist. Please enlighten me if you have an example.
- kccqzy 8y agoVLA.
- gmueckl 8y agoOkay, this is true. Using alloca directly is not a good alternative.
- mikulas_florek 8y agohttps://en.cppreference.com/w/c/language/restrict https://en.cppreference.com/w/c/language/restrict
- gmueckl 8y agoReplace it with __restrict and you're fine.
- mikulas_florek 8y agonot standard c++
- maximilianburke 8y agoDesignated initializers. (yet)
- mikulas_florek 8y agothat's just syntactic sugar