tvb-root
tvb-root copied to clipboard
[ISSUE-544] improve speed of reduced set models
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.