Microbiology / JuliaPerlBenchmark

A Basic Benchmark Comparison of Perl and Julia
1 stars 6 forks source link

Add Julia graphing? #4

Closed cormullion closed 8 years ago

cormullion commented 8 years ago

I thought of adding a short Julia snippet for plotting the results (since I don't understand R). I got this far:

using DataFrames, Plots
f = open("time.log")
timings = readtable(f,  
    separator = '\t', 
    header = false, 
    names=[:realsysuser, :timing, :language, :number])
close(f)

sort!(timings, cols = [:number, :realsysuser])

perltimings = timings[timings[:language] .== "Perl", :][:timing]
juliatimings = timings[timings[:language] .== "Julia", :][:timing]

plot([perltimings juliatimings], label=["Perl" "Julia"])

but I'm not 100% sure I ran the benchmarks properly. Anyway, here it is, for what it's worth!

plot

Microbiology commented 8 years ago

Thanks, and great idea! I don't have experience graphing with Julia, but it looks nice. I'm not sure what is going on with the x-axis. Are the values being treated as discrete categories instead of continuous values? If you figure it out, can you create a pull request so that we can integrate it into the main repo?

cormullion commented 8 years ago

I did a PR to make a graph. It looks like the benchmark script starts up Julia each time, which might be inefficient. Also I don't know the difference between real/sys/user timings. Good luck!

Microbiology commented 8 years ago

Yeah there might be a better way to do it without restarting every time. That would be cool to implement.

Here is an explanation of the different parameters on SO. I see though that it looks like the plot was combining all of the times without splitting them by category.

http://stackoverflow.com/questions/556405/what-do-real-user-and-sys-mean-in-the-output-of-time1