- changed status to open
- removed comment
Optimise calls to CCTK_VarDataPtr
Issue #1143
resolved
Cactus calls CCTK_VarDataPtr each time DECLARE_CCTK_ARGUMENTS is executed for each grid function. This routine performs string looks and is thus unreasonably expensive.
The attached patch remembers variable indices in static variables.
Keyword:
Comments (3)
-
reporter -
- changed status to open
- removed comment
Changes the previous method of doing hundreds of string compares on each function invocation to finding and caching the variable index in a static variable.
-
reporter - changed status to resolved
- removed comment
Applied.
- Log in to comment