I have a colleague who insists on writing code such as this :
!-----calculate Grashof numbers --------------
grashm = G * betam * dt * (L*L*L) * (denm*denm) / (vism*vism) ! fluid mean
grashl = G * betal * dt * (L*L*L) * (denl*denl) / (visl*visl) ! liquid
grashg = G * betag * dt * (L*L*L) * (deng*deng) / (visg*visg) ! gas
Compared to my usual practice, which would be this:
grashm = G * betam * dt * L**3 * denm**2 / vism**2 ! fluid mean
grashl = G * betal * dt * L**3 * denl**2 / visl**2 ! liquid
grashg = G * betag * dt * L**3 * deng**2 / visg**2 ! gas
What are the pros and cons here? Is there any chance one or the other of these will be faster in execution, assuming they are both compiled with full optimization?
Qolin