Quote:Chaoran Chen wrote:
Quote:Chaoran Chen wrote: Here is a small problem: I called this function repeatly. If I change the last line "interp_value(i)=t" into "interp_value(i)=1.d0", the program would be much faster (with the...
View ArticleWhen you change from
When you change from assigning t to 1.d0, a few things happen.1) You are assigning a constant value, the compiler can hardcode this store.2) t is never used, the compiler can optimize this out...
View ArticleCasey is right. In Release
Casey is right. In Release build, the compiler optimization capability is quite remarkable. In your code it will:a) recognize a_index is local variableb) recognize t is local variablec) recognize...
View ArticleQuote:Chaoran Chen wrote:
Quote:Chaoran Chen wrote:Here is a small problem: I called this function repeatly. If I change the last line "interp_value(i)=t" into "interp_value(i)=1.d0", the program would be much faster (with the...
View ArticleWhen you change from
When you change from assigning t to 1.d0, a few things happen.1) You are assigning a constant value, the compiler can hardcode this store.2) t is never used, the compiler can optimize this out...
View ArticleCasey is right. In Release
Casey is right. In Release build, the compiler optimization capability is quite remarkable. In your code it will:a) recognize a_index is local variableb) recognize t is local variablec) recognize...
View Article