repos
/
benchmark
/ annotate_shade
summary
|
shortlog
|
log
|
tree
|
commit
|
commitdiff
|
headdiff
|
annotate
|
headblob
|
headfilediff
|
filehistory
normal
|
plain
|
shade
|
zebra
initial import
Annotate for file plot.R
2009-05-25 tobias
1
#!/usr/bin/R
14:59:32 '
2
'
3
'
4
boxplot_benchmark <- function(lisp_data, cxx_data) {
'
5
cxx_mean <- mean(cxx_data$PROCESSOR.CYCLES)
'
6
boxplot(c(cxx_data["PROCESSOR.CYCLES"]/cxx_mean, lisp_data["PROCESSOR.CYCLES"]/cxx_mean),
'
7
log="y", names=c("C++", "Lisp"), ylab="processor cycles")
'
8
}
'
9
'
10
pdf("benchmark.pdf")
'
11
'
12
cxx_simple_call <- read.table("cxx-simple-call.dat", header=TRUE)
'
13
simple_call <- read.table("simple-call.dat", header=TRUE)
'
14
boxplot_benchmark(simple_call, cxx_simple_call)
'
15
title("Simple Call")
'
16
'
17
cxx_inline_call <- read.table("cxx-inline-call.dat", header=TRUE)
'
18
inline_call <- read.table("inline-call.dat", header=TRUE)
'
19
boxplot_benchmark(inline_call, cxx_inline_call)
'
20
title("Inline Call")
'
21
'
22
cxx_overload <- read.table("cxx-overload.dat", header=TRUE)
'
23
overload <- read.table("overload.dat", header=TRUE)
'
24
boxplot_benchmark(overload, cxx_overload)
'
25
title("Overload Virtual Function")
'
26
'
27
'
28
cxx_construct <- read.table("cxx-construct.dat", header=TRUE)
'
29
construct <- read.table("construct.dat", header=TRUE)
'
30
boxplot_benchmark(construct, cxx_construct)
'
31
title("Construct Class")