Reputation: 59
I need to optimize some code and I came across the term "function splitting" in the man page of ifort. When googled, I couldn't get any details regarding this kind of optimization.
This is enabled by the compiler flag -fnsplit for ifort compiler.
Does any one know how this type of optimization works and when will this kind of optimization be most effective?
I have to implement it on FORTRAN code. Any suggestion would be helpful.
Upvotes: 0
Views: 576
Reputation: 78316
Function splitting is an optimisation technique affecting how functions are inlined. I can't honestly say that I fully understand it so I won't try to explain it badly. See this paper and the other sources it refers to for more details.
To implement it in Fortran code, you just use your compiler; as you observe the Intel compiler uses a flag called fnsplit
. If other compilers implement the technique I'm sure that their documentation will tell you how to engage it. As to whether it is beneficial or not, the only sure way to find out is to do some experiments.
Upvotes: 4