For various reasons (e.g. fidelity with the actual tax calculations which use integers, not fractional components; or because of conversion via Rcpp), there is quite a lot of conversion between integer types and double types in income_tax and model_income_tax. This slows down the computations a little and could potentially be avoided. See hutilscpp::pmaxC and friends for compatible versions which avoid the performance hit.