Skip to content

Instantly share code, notes, and snippets.

@VisruthSK
VisruthSK / benchmark.R
Created March 2, 2026 05:50
Mirai tests
project_root <- normalizePath(getwd(), mustWork = TRUE)
script_baseline <- file.path(project_root, "loo_mirai", "test.R")
script_fast <- file.path(project_root, "loo_mirai", "test_fast.R")
cache_baseline <- file.path(project_root, "loo_mirai", ".cache_baseline")
cache_fast <- file.path(project_root, "loo_mirai", ".cache_fast")
resolve_rscript <- function() {
candidate <- file.path(
R.home("bin"),
if (.Platform$OS.type == "windows") "Rscript.exe" else "Rscript"
<!-- Built off of https://lucidmanager.org/productivity/hugo-bibliography/ -->
<!-- https://creativecommons.org/licenses/by-sa/4.0/ -->
{{- $bib_key := .Page.Params.bib -}}
{{- $all_bib_data_from_site := slice -}}
{{- $data_found_and_valid := false -}}
{{- $error_message := "" -}}
{{- if $bib_key -}}
{{- if isset site.Data $bib_key -}}
{{- $retrieved_data := index site.Data $bib_key -}}