In [25]:
Pkg.add("DataFrames")
Pkg.add("Gadfly")
In [2]:
cd("/Users/utensil/experiments")
In [4]:
run(`git clone https://github.com/JuliaLang/julia.git`)
In [3]:
cd("julia/test/perf/micro")
In [4]:
run(pipeline(`python perf.py`, stdout="py.csv"))
In [5]:
run(pipeline(`julia perf.jl`, stdout="jl.csv"))
In [6]:
run(pipeline(`r --vanilla --slave -f perf.R`, stdout="r.csv"))
In [7]:
run(pipeline(`cat py.csv r.csv`, stdout="benchmarks.csv"))
In [8]:
using DataFrames
using Gadfly
In [10]:
jl_data = readtable("jl.csv", header=false, names=[:language, :benchmark, :min, :max, :mean_time, :std])
Out[10]:
In [18]:
benchmarks = readtable("benchmarks.csv", header=false, names=[:language, :benchmark, :mean_time])
Out[18]:
In [19]:
jl_benchmarks = jl_data[:, [:language, :benchmark, :mean_time]]
Out[19]:
In [20]:
benchmarks = [benchmarks; jl_benchmarks]
Out[20]:
In [21]:
p = plot(benchmarks,
x = :language,
y = :mean_time,
color = :benchmark,
Scale.y_log10,
Guide.ylabel(nothing),
Guide.xlabel(nothing),
Theme(
default_point_size = 1mm,
guide_title_position = :left,
colorkey_swatch_shape = :circle,
minor_label_font = "Georgia",
major_label_font = "Georgia",
),
)
draw(SVG(8inch,8inch/golden), p)
In [23]:
p = plot(benchmarks,
x = :language,
y = :mean_time,
color = :benchmark,
Scale.y_continuous,
Guide.ylabel(nothing),
Guide.xlabel(nothing),
Theme(
default_point_size = 1mm,
guide_title_position = :left,
colorkey_swatch_shape = :circle,
minor_label_font = "Georgia",
major_label_font = "Georgia",
),
)
draw(SVG(8inch,8inch/golden), p)
In [ ]: