ymd icon indicating copy to clipboard operation
ymd copied to clipboard

Add clock package to benchmarks?

Open TimTaylor opened this issue 8 months ago • 0 comments

Cool package. Would you consider adding clock to the comparisons where appropriate? I've not got a rust toolchain set up to do the comparison with ymd but, as an example. I suspect ymd will still dominate but still interesting as a survey across the package landscape

x <- c("2021-01-01", "2022-12-31", "1995-03-22")
x <- rep(x, 100)
microbenchmark::microbenchmark(
    clock = clock::as_date(clock::year_month_day_parse(x)),
    base = as.Date(x),
    check = "equal"
)
#> Unit: microseconds
#>   expr     min       lq     mean   median       uq     max neval
#>  clock 124.844 133.4650 139.3772 136.8560 143.9500 249.237   100
#>   base 834.262 841.1795 847.1995 846.2295 852.1405 882.733   100

Created on 2025-04-15 with reprex v2.1.1

TimTaylor avatar Apr 15 '25 08:04 TimTaylor