3 ms·
> There's no way C can be other than marginally faster than C++ In theory `restrict` (to disallow pointer aliasing like in Fortran) could lead to optimization
by ReleaseCandidat 5y ago
> There's no way C can be other than marginally faster than C++
In theory `restrict` (to disallow pointer aliasing like in Fortran) could lead to optimization gains, same as not having exceptions (the possibility of exceptions prohibits certain optimizations of the C++ compiler).
- dorinlazar 5y agoI agree; of course, both clang and gcc extend C++ with __restrict__ if I remember correctly; from what I know, there are more things that can be done in C++ to improve over C than the other way around.
- khoobid_shoma 5y agoIIRC, __restrict__ in clang and g++ does nothing when you write C++ code. It is there just for compatibility with C.