Comment by flohofwoe
3 years ago
> Fortran is significantly faster than C, for instance.
AFAIK the main reason is pointer aliasing, e.g. you may need to sprinkle C code with the restrict keyword to work around the issue. "Significantly faster" is debatable of course, I bet it's possible both in Fortran and C to write code that performans equally bad.
So you're saying that the aliasing defaults of C are an issue. Well... I suppose, but - not `restrict`ing your pointers in the hottest part of the code is a bit like not compiling with optimizations on.
Yes, in the end it's just a regular optimization issue, check the compiler output, tweak the code, rinse-repeat...