Redundant computations with multilevel models and Slice sampler

I think what you have in mind is a bit more like what metropolis does, where it compiles a function of the delta logp, so that terms that are constant can be cancelled out: pymc/metropolis.py at 7a5074e2d4d7514784b6542cbb2f02d843549739 · pymc-devs/pymc · GitHub

I am not sure if slice sampling can work based on the delta logp.

If it could, it also matters how complicated the code would need to be.