Open jmoralez opened 8 months ago
i love this. i think we should move forward with the enhancement.
regarding the second drawback, i agree with the nightly wheels option. also adopting a compiled alternative will force us to make releases more often. 🙌
regarding the first drawback, we could still have some models relying on numba as an optional dependency. for example, if we release a new model written in numba, it will be only available installing statsforecast[numba]
. this approach could help us iterate new models faster and once they are stable, we could migrate them to their compiled version. :)
I used the following to profile the current compilation times:
And got the following results:
[('theta', 5673),
('arima', 4938),
('ces', 4828),
('ets', 4507),
('tbats', 1476),
('garch', 1099),
('models', 286)]
So I believe we can migrate them in that order (I already migrated ETS in #757 because I profiled this wrong xD) but we can continue with Theta next.
Description
We've heavily relied on numba to speed up our models, however we don't have the need for its JIT compilation, since the code that uses it is defined inside the library.
Replacing numba jitted code with a compiled alternative (C++ or Rust for example) would provide the following benefits:
And the following drawbacks:
Use case
This will benefit the development process since even when using the cache it can take a couple of seconds to run jitted functions for the first time. Also deployments would be smoother because either: