Efficient MCMC for Gibbs Random Fields using pre-computation