library(plant)
library(bench)
lai_grid <- seq(1, 8, by = 0.5)
results <- lapply(lai_grid, function(L) {
bench::mark(
baseline = run_inner_ff16(lai = L),
hydraulic = run_inner_hydraulics(lai = L),
iterations = 20, check = FALSE
)
})Hydraulics inner-loop benchmark
plant @develop a1b2c3d
This post is built against an unreleased commit on develop, so the badge pins to a SHA rather than a version. The simulation below is slow, so it’s pinned to its own renv snapshot as well — a later project-wide package upgrade can’t change this result even on a forced re-run.
Per-post environment
This directory carries its own lockfile, captured once when the post was written:
# run from this post's directory, once:
renv::snapshot(lockfile = "renv.lock.dev", prompt = FALSE)plant_session_info() (footer) reports renv.lock.dev when present, so the page records exactly which environment produced the figures. To reproduce: check out plant at the SHA above, renv::restore(lockfile = "renv.lock.dev"), delete this post’s _freeze/ entry, re-render.
The sweep
# ... ggplot of median time by method across lai_grid ...Numbers here are frozen to commit a1b2c3d. When this work lands on master, supersede this post with a release-pinned version rather than editing it — keeping the develop snapshot as the historical record.