You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wouldn't normally make this issue for fear it feels nit-picky, but given that speed is a primary focus of this package I thought I would mention it to see if there is interest in me making this change.
Currently the state prediction step is:
trans =transition_matrix(hmm, control_seq[t])
αₜ, αₜ₊₁ =view(α, :, t), view(α, :, t +1)
mul!(αₜ₊₁, transpose(trans), αₜ)
This means that this transposition is performed every time step leading to inefficient memory access at each filtering step. For the time-homogenous HMM it might make sense to cache a copy of the transposed matrix.
A rough implementation of this change led to a roughly 10–15% reduction on the package benchmarks for the forward algorithm on my laptop.
The text was updated successfully, but these errors were encountered:
As discussed in #107, this is not necessarily going to bring speedups, so let's close it for now. If someone finds an MWE with a clear performance boost we'll reopen.
I wouldn't normally make this issue for fear it feels nit-picky, but given that speed is a primary focus of this package I thought I would mention it to see if there is interest in me making this change.
Currently the state prediction step is:
This means that this transposition is performed every time step leading to inefficient memory access at each filtering step. For the time-homogenous HMM it might make sense to cache a copy of the transposed matrix.
A rough implementation of this change led to a roughly 10–15% reduction on the package benchmarks for the forward algorithm on my laptop.
The text was updated successfully, but these errors were encountered: