Skip to content

Instantly share code, notes, and snippets.

@eightbitraptor
Last active January 22, 2021 15:38
Show Gist options
  • Save eightbitraptor/289d2713375034d6d8374d67f6cb7a27 to your computer and use it in GitHub Desktop.
Save eightbitraptor/289d2713375034d6d8374d67f6cb7a27 to your computer and use it in GitHub Desktop.
benchmarking data for variable width allocation project initial microbenchmark results
if (!requireNamespace('tidyverse'))
install.packages('tidyverse')
if (!requireNamespace('ggplot2'))
install.packages('ggplot2')
library(ggplot2)
library(tidyverse)
# Uncomment these to run either set of numbers
# OPTCARROT
master_benchmark_data <- as_tibble(c(43.27430926,
42.65007047,
43.32562887,
42.64047665,
43.40328494))
branch_benchmark_data <- as_tibble(c(41.59069356,
40.51252649,
40.55757381,
41.76160937,
42.95645122))
# MICRO-BENCHMARK
# master_benchmark_data <- as_tibble(c(16.372,
# 16.399,
# 16.058,
# 15.98,
# 16.426))
# branch_benchmark_data <- as_tibble(c(16.901,
# 16.909,
# 16.695,
# 16.757,
# 16.818))
all_data <-
bind_rows(
master_benchmark_data %>% add_column(branch = "master"),
branch_benchmark_data %>% add_column(branch = "feature"))
data_means <- all_data %>% group_by(branch) %>%
summarise(means = mean(value),
sdev = sd(value),
count = n(),
serr = sd(value)/sqrt(n()))
p <- ggplot(data = data_means) +
aes(x = branch, y = means) +
geom_point(data=data_means) +
labs(title = "Optcarrot: Mean and standard error of feature vs master branches", x = "branch", y = "frames per second") +
geom_errorbar(aes(ymin=means - serr, ymax=means + serr), width=.05,
position=position_dodge(.9))
p
mean_diff <- data_means %>%
pull(means)
mean_perc_diff = ((mean_diff[1] - mean_diff[2])/mean_diff[1]) * 100
err_diffs <- data_means %>%
summarize(branch,
upper = means + serr,
lower = means - serr)
f_lower = err_diffs$upper[err_diffs$branch == 'feature']
m_upper = err_diffs$lower[err_diffs$branch == 'master']
min_err_difference = ((f_lower - m_upper) / f_lower) * 100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment