Reduce time spent in cycling timelevels if there is only one timelevel.

Issue #1297 closed
Peter Diener created an issue

I noticed in a run with gridfunctions with only 1 timelevels that a significant amount of time was spent cycling timelevels. The attached patch makes the routine bypass a lot of code, if a grid variable only has 1 timelevel. This reduces the total time spent in cycling timelevels from 417 s to 0.8 s for a run of 32767 iterations.

Keyword: performance
Keyword: optimization

Comments (6)

  1. Erik Schnetter
    • removed comment

    Do you know in what parts of the code all the time was spent? Maybe these parts should be optimized anyway, so that other simulations could benefit as well.

  2. Peter Diener reporter
    • removed comment

    No, I only got one timer number for the whole routine. I could look at it in more detail with vtune but the time spent in the routine per call is only 0.012 s, so it might be difficult to get sensible numbers.

  3. Log in to comment