ClimaCoupler.jl icon indicating copy to clipboard operation
ClimaCoupler.jl copied to clipboard

Performance tips

Open valeriabarra opened this issue 2 years ago • 0 comments

A few recommendations that we should always keep in mind to avoid any performance degradation that we may have introduced in some recent developments:

Try to avoid:

  • Closures over global variables (FT)
  • Use of Val when not necessary-- these symbols are not needed by the compiler, so there's no need to add them just so that we can specialize on them. (this was introduced in the update_field! in #320 )
  • Use of parent, when not necessary (though, we saw that when exchanging quantities from fields that are not from the same space, or are from the same space but not instance (see #249 for reference) this is not possible)

valeriabarra avatar Jun 15 '23 01:06 valeriabarra