Performance question / issue on particular problem

Hi,

My assessment of this is approximately the same as @luk-f-a’s, that compilation is being included in the execution time because there’s exec'd strings involved and Numba sees these as new functions every time. I imagine the execution to compilation time ratio for your function is heavily skewed towards compilation at present.

Questions:

  1. Could you create a small self contained reproducing example? That would make it easier to help with this.
  2. Is dy scalar? Looks like it might be a float?
  3. What influences the “dynamics” expression? Is it the number of nodes or some property of the nodes too? If it’s both, can they be separated into an expression over the “number of nodes” with variables left unresolved for the property part, e.g. in the above:
    alpha = 0.508152554938578
    [1.0 + alpha*(-y[0, max_delay + i - 1] + y[2, max_delay + i - 1]) + 4.0*y[0, max_delay + i - 1]**2 ...
    
  4. Are the “dynamic” expressions actually constant expressions that will likely never/rarely change?
1 Like