initial import
plot.R
Mon May 25 16:59:32 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* initial import
--- old-benchmark/plot.R 1970-01-01 01:00:00.000000000 +0100
+++ new-benchmark/plot.R 2014-10-30 07:07:41.000000000 +0100
@@ -0,0 +1,31 @@
+#!/usr/bin/R
+
+
+boxplot_benchmark <- function(lisp_data, cxx_data) {
+ cxx_mean <- mean(cxx_data$PROCESSOR.CYCLES)
+ boxplot(c(cxx_data["PROCESSOR.CYCLES"]/cxx_mean, lisp_data["PROCESSOR.CYCLES"]/cxx_mean),
+ log="y", names=c("C++", "Lisp"), ylab="processor cycles")
+}
+
+pdf("benchmark.pdf")
+
+cxx_simple_call <- read.table("cxx-simple-call.dat", header=TRUE)
+simple_call <- read.table("simple-call.dat", header=TRUE)
+boxplot_benchmark(simple_call, cxx_simple_call)
+title("Simple Call")
+
+cxx_inline_call <- read.table("cxx-inline-call.dat", header=TRUE)
+inline_call <- read.table("inline-call.dat", header=TRUE)
+boxplot_benchmark(inline_call, cxx_inline_call)
+title("Inline Call")
+
+cxx_overload <- read.table("cxx-overload.dat", header=TRUE)
+overload <- read.table("overload.dat", header=TRUE)
+boxplot_benchmark(overload, cxx_overload)
+title("Overload Virtual Function")
+
+
+cxx_construct <- read.table("cxx-construct.dat", header=TRUE)
+construct <- read.table("construct.dat", header=TRUE)
+boxplot_benchmark(construct, cxx_construct)
+title("Construct Class")