Prior normalization cache
I noticed that my code was spending a lot of time calculating the normalization when there were no constraints as there was a missing caching.
A potential neater solution would be if there were a way to determine if the prior dict has constraints, but that isn't currently possible.