Added more options for controlling the precomputation.