Make some calculation use arrays instead of everytime calculation

This pull request includes previous one (about caching largeEstimatorCutoff), so feel free accept anything from either one, or reimplement my proposed changes :)