Reproducing results
Run benchmark commands from the repository root. Correctness, evaluation speed, and fitting speed have separate entry points so each result can be reproduced without running the entire suite.
1. Prepare the environments
Instantiate the Julia benchmark project:
julia --project=benchmarks -e '
using Pkg
Pkg.develop(path=".")
Pkg.resolve()
Pkg.instantiate()
'Install the R reference dependency once:
Rscript -e 'install.packages("rvinecopulib", repos="https://cloud.r-project.org")'The fitting and correctness R scripts intentionally contain only the small amount of code needed to call rvinecopulib and write reference results.
2. Correctness gate
Run both release parity modes:
PARITY_N=800 PARITY_FIT_MODE=common \
bash benchmarks/correctness/run_correctness_gate.sh
PARITY_N=800 PARITY_FIT_MODE=default \
bash benchmarks/correctness/run_correctness_gate.shHuman-readable diagnostics are written to:
benchmarks/correctness/results/fixed_report.txt
benchmarks/correctness/results/fit_report.txtShared deterministic fixtures are versioned with the benchmark harness; generated bridge files and local results are not.
3. Evaluation speed
Run the standard evaluation campaign:
bash benchmarks/run_main.shThe command runs the configured family/scenario battery and regenerates:
benchmarks/reports/benchmark_summary.md
benchmarks/reports/benchmark_times_summary.csv
benchmarks/reports/benchmark_validation_summary.csvOnly cases requested by that invocation are summarized, so unrelated files from older local experiments are not included.
For one targeted case:
FAMILY=gumbel MODEL=D P=10 N=10000 TRUNC=2 \
bash benchmarks/run_one.sh4. Focused kernel and allocation diagnostics
To isolate the optimizations used by the vine engines from the full benchmark battery, run:
julia --project=benchmarks benchmarks/diagnostics/fused_pair_kernels.jl
julia --project=benchmarks benchmarks/diagnostics/vine_engine_allocations.jlThe first command compares the historical three-independent-primitive pattern with the fused pair step for Gaussian, Student, Clayton, Frank, and Gumbel. The second reports end-to-end logpdf time, memory, and allocations for homogeneous and mixed C-, D-, and standard R-vines over several dimensions and truncation levels. Set N and SAMPLES in the environment to change its workload.
The Student-specific study remains separate because scalar Student-t CDF/quantile calls can dominate even after repeated base quantiles are removed:
bash benchmarks/tcopula_study/run_t_study.shIts diagnostics cover several degrees of freedom, central probabilities, extreme tails, Rmath-versus-StatsFuns scalar kernels, backend round-trip checks plus an exact ν=2 tail check, primitive allocations, and fused versus independent density/h-function evaluation.
5. Fitting speed
Run both selector spaces:
MODE=common N=1000 P=5 REPEATS=3 \
bash benchmarks/fitting/run_fit.sh
MODE=default N=1000 P=5 REPEATS=3 \
bash benchmarks/fitting/run_fit.shEach run benchmarks:
Gaussian pair-family selection;
Clayton pair-family selection;
fixed-structure R-vine fitting;
automatic R-vine fitting.
The generated reports are:
benchmarks/reports/fitting_benchmark_common.md
benchmarks/reports/fitting_benchmark_default.md6. Full speed suite
After correctness has already been established:
bash benchmarks/run_all.shReproducibility notes
Timing results depend on hardware, Julia/R versions, system load, and compiler state. The scripts warm up the measured operation before recording repetitions and report medians for the fitting battery.
When publishing or comparing benchmark results, record at least:
operating system and architecture;
Julia version;
R version;
VineCopulas.jl version or commit;
Copulas.jl version;
rvinecopulibversion;, , truncation level, family set, and number of repetitions.
Generated raw data and logs are local artifacts. The lightweight Markdown/CSV reports under benchmarks/reports/ are the reviewable outputs intended to accompany the documentation.