grattan icon indicating copy to clipboard operation
grattan copied to clipboard

Avoid expensive switching between integer and double types

Open HughParsonage opened this issue 6 years ago • 0 comments

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.

HughParsonage avatar Mar 23 '19 02:03 HughParsonage