On speeding up synthesis and prediction of functions