pao_elem_derivative_2 is called on scalars inside a loop #198
Labels
area: main-source
Relating to the src/ directory (main Conquest source code)
improves: speed
Speed-up of code
The second hotspot shown in profiling in #197 is
CONQUEST-release/src/PAO_grid_transform_module.f90
Lines 394 to 400 in 4162a3c
Disregarding the if statement, which we can remove, It looks like the main issue is
pao_elem_derivative_2
(and all functions it calls) are called on scalar arguments, but the call is being made from inside a loop nest. To speed this up, the loop nest should be moved to the bottom of the call chain, which would allow vectorization and get rid of a lot of function calling overheads.The text was updated successfully, but these errors were encountered: