Skip to content

Add clock package to benchmarks? #8

@TimTaylor

Description

@TimTaylor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions