Skip to content

Commit

Permalink
percentual stddev
Browse files Browse the repository at this point in the history
  • Loading branch information
janmasrovira committed Jan 3, 2023
1 parent 4cb930a commit 2d85fa4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions bench/Suites.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ suites =
defaultSuite
[ "mergesort",
"fibonacci",
"ackermann",
"combinations",
"ackermann", -- juvix crashes
"combinations", -- juvix crashes: out of call stack
"cps",
"fold",
"mapfold",
Expand Down
21 changes: 14 additions & 7 deletions gnuplot/bars.gp
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,28 @@ unset key
set yrange [0 : *]

set multiplot layout 2, 1 title ('suite '.name) font ",24" scale 1, 1
do for [target in targets] {
set title target font ",20"
plot csvfile \
using target:colorCol:xtic(2) notitle column(2) lc rgbcolor variable, \
'' using 0:target:(sprintf("%1.4f",column(target))) with labels font ",13" center offset 0, 0.4 title target, \

}
set title meanCol font ",20"
plot csvfile \
using meanCol:colorCol:xtic(2) notitle linecolor rgbcolor variable, \
'' using 0:meanCol:(sprintf("%1.4f",column(meanCol))) with labels font ",13" center offset 0, 0.4 title meanCol, \


set title "Standard deviation" font ",20"
unset ylabel

f(x) = column(stddevCol)*100/column(meanCol)
plot csvfile \
using (f('')):colorCol:xtic(2) notitle linecolor rgbcolor variable, \
'' using 0:(f('')):(sprintf("%1.2f%",(f('')))) with labels font ",13" center offset -9,0.4 notitle

unset multiplot

set terminal svg enhanced mouse size 600, 1100
set output outfile.'.svg'
set multiplot layout 2, 1 title ('suite '.name) font ",24" scale 1, 1
do for [target in targets] {
set key outside
do for [target in targets] {
replot
}
unset multiplot

0 comments on commit 2d85fa4

Please sign in to comment.