tvb-root icon indicating copy to clipboard operation
tvb-root copied to clipboard

[ISSUE-544] improve speed of reduced set models

Open omarshafik opened this issue 11 months ago • 3 comments

Reduced Set models don't use numba for enhanced performance. This uses numba njit wrapper to compile the deriviative functions during runtime, and provide considerable performance gain.

Since numba currently doesn't fully support jit-ed classes, derivative functions have to move outside the class scope. To improved readability, they were moved to a new file: _dfun_stefanescu_jirsa.py.

To test the changes a new unit test module was added: models_benchmark.py. Here, we compute the derivative multiple times within a time window with/without numba and compare the throughput. Around 5x performance gains were observed. We also verify that numba doesn't change derivative values.

omarshafik avatar Mar 30 '25 19:03 omarshafik