The performance difference between C and C++ versions

I personally prefer the C version for various reasons.
It’s mainly because all the older projects were written with it so it’s easy to maintain them, and often I copy previous implementations to newer projects.

I know it wouldn’t be noticeable, but I also believed the C version was faster than the C++ version.
As we know and see from the screenshot below, C is more performant than C++.
Also, I thought FMOD’s C++ version was a wrapper for the C version.

Is the C version really faster even if it’s negligible?

Internally FMOD is written in C++ and the C interface is provided as a wrapper. So, when you call one of the C APIs, internally this just calls the C++ equivalent. Performance should be basically the same, maybe very slightly more expensive for C since it has an additional function call.

2 Likes

Oh, it was the opposite, haha.
Thank you!