Having recently read that the main reason why fortran is faster than c/c++ in numerical computations is because there is no pointer aliasing.
Apparently, using restrict
or __restrict__
keywords allows on a case by case basis to indicate the absence of pointer aliasing for a given memory element.
The icc compiler apparently has an option -fno-alias
which allows one to globally assume that no aliasing is present. On gcc there is -fno-strict-aliasing
, which applies only to a subset of all the aliasing situations.
Is there an option present in gcc, or are there some cases where no aliasing is assumed, when using certain optimization flags?