Quantcast
Channel:
Browsing all 8 articles
Browse latest View live

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 Article


When 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 Article


Casey 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

Thanks for the helpful

Thanks for the helpful comments.

View Article

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 Article


When 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 Article

Casey 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

Thanks for the helpful

Thanks for the helpful comments.

View Article

Browsing all 8 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>