README (original) (raw)
grattanInflators
Utility package for CPI and other inflators.
Benchmarks
x <- rep_len(fy::yr2fy(1999:2020), 1e7)
system_time(grattan::cpi_inflator(, x, "2019-20"))## process real
## 531ms 482mssystem_time(cpi_inflator(x, "2019-20"))## process real
## 438ms 439mssystem_time(cpi_inflator(x, "2019-20", nThread = 4L))## process real
## 391ms 114msy <- dqrng::dqsample(x)
system_time(grattan::cpi_inflator(, x, y))## process real
## 24.3s 21.1ssystem_time(cpi_inflator(x, y, nThread = 4L))## process real
## 984ms 241msx <- rep_len(x, 1e8)
system_time(cpi_inflator(x, "2019-20", nThread = 4L))## process real
## 4.61s 1.25sx <- seq(as.Date("1999-01-01"), as.Date("2020-01-01"), by = "1 day")
x <- rep_len(x, 1e7)
system_time(cpi_inflator(x, "2019-01-01"))## process real
## 297ms 311msx <- rep_len(x, 1e8)
system_time(cpi_inflator(x, "2019-01-01", nThread = 4L))## process real
## 3.67s 1.29sx <- as.IDate(x)
system_time(cpi_inflator(x, as.IDate("2019-01-01"), nThread = 4L))## process real
## 2.66s 905.37ms