From 210f1de4e39fa94faf353392a4d5f0c08a30f4c5 Mon Sep 17 00:00:00 2001 From: Lukas Schneiderbauer Date: Mon, 1 Jan 2024 20:13:17 +0100 Subject: [PATCH] update README with benchmarks --- README.Rmd | 41 +++++++++++++++++++++++++++++++++++++++++ README.md | 12 ++++++++++++ 2 files changed, 53 insertions(+) diff --git a/README.Rmd b/README.Rmd index 14976d9..c0205a0 100644 --- a/README.Rmd +++ b/README.Rmd @@ -66,3 +66,44 @@ A plotting function (using ggplot) for the result is built in. The individual ru ```{r example_plot} plot(res) ``` + + +## Benchmarks + +```{r benchmark_calc, echo=FALSE, message=FALSE, warning=FALSE} +result <- readRDS("./benchmark/results.rds") + +library(ggplot2) +library(dplyr) +``` + +The benchmarks were taken on an Intel® Xeon® CPU E3-1231 v3 @ 3.40GHz CPU. + +The following graph shows the run time behavior as the number of sites `n` increase. The curve exhibits near-cubic behavior in `n`. For `n = 110` the performance is still relatively reasonable with a run time of approximately `97 ms`. + +```{r benchmark_runtime, echo = FALSE} +result |> + mutate( + ymin = as.numeric(mean - std), + ymax = as.numeric(mean + std), + median = as.numeric(median) + ) |> + ggplot(aes(x = n, y = median, ymin = ymin, ymax = ymax)) + + scale_x_continuous( + name = "Number of items", + labels = scales::label_number( + scale_cut = scales::cut_long_scale() + ) + ) + + scale_y_continuous( + name = "Runtime (in seconds)", + labels = scales::label_number( + suffix = "s", + scale_cut = scales::cut_long_scale() + ) + ) + + geom_ribbon(alpha = 0.3, linewidth = 0) + + geom_point() + + geom_line() + + theme_minimal() +``` diff --git a/README.md b/README.md index b3a0ef7..bca0a51 100644 --- a/README.md +++ b/README.md @@ -87,3 +87,15 @@ plot(res) ``` + +## Benchmarks + +The benchmarks were taken on an Intel® Xeon® CPU E3-1231 v3 @ 3.40GHz +CPU. + +The following graph shows the run time behavior as the number of sites +`n` increase. The curve exhibits near-cubic behavior in `n`. For +`n = 110` the performance is still relatively reasonable with a run time +of approximately `97 ms`. + +