PyMC2 has some tricky tricks for reducing function evaluations if possible. A question asked and answered on Stack Overflow investigates: http://stackoverflow.com/q/27714635/1935494 and I made a IPython Notebook with more details, too: http://nbviewer.ipython.org/gist/aflaxman/c07c5261bf22f6847098