Which in turns slows down `cal_sum()` and `cal_density()`. Try parallelising or not using purrr or using Rcpp?