Speedup to wfhmm backwards algorithm