Faster slice indexing for HMMs