-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Benchmark tweaks #2278
RFC: Benchmark tweaks #2278
Conversation
pygy
commented
Feb 12, 2013
- Added pi_sum_vec to Matlab, Julia, Python and R (disabled)
- Tweaked parseint in perf.R
- Added perf.lua by Francesco Abatte (Needs the GSL Shell)
* Added pi_sum_vec to Matlab, Julia and R (disabled) * Tweaked parseint in perf.R * Added perf.lua by Francesco Abatte (Needs the GSL Shell)
These seem quite reasonable. I don't think that most R users write @StefanKarpinski We will need to refresh the benchmarks post 0.1, and we may even want to include our graph. Anyways, we should move towards running these benchmarks on julia.mit.edu going forward. |
Agreed. We should use Gadfly to generate a pretty graph too! |
Yes, the two pull requests is a bit confusing. Should we just use this one? |
This stems from an email conversation between Viral, Francesco and me. Viral requested a pull request, and we both did it, independently. I'd keep this one, since there are other changes. |
This one also has the vectorized versions. |
It should be good now. @franko, could you implement pi_sum_vec in lua (already in perf.jl, .m, .py and .R)? |
@pygy gsl shell does not support coding in vectorized form so I cannot implement pi_sum_vec without implementing some amount of boilerplate code. This was a design choice (good or bad) for gsl shell: it doesn't aim to be like matlab. Talking about the benchmark I believe it should mandate which problem should be solved and not how it should be solved. |
If the problem is to compute |
I guess @franko didn't read the home page... |
@StefanKarpinski I'm not going to argue about that. From the practical point of view gsl shell lacks support for operations in vector form so it is probably better to omit it. |
using Compose, Gadfly, DataFrames
benchmarks = DataFrame(readcsv("benchmarks.csv"),
["Language", "Benchmark", "Time"])
p = plot(benchmarks,
{:y => "Benchmark", :x => "Time", :color => "Language"},
Geom.point, Scale.x_log10, Guide.XLabel("Time (Log10 Seconds)"))
draw(SVG("benchmarks.svg", 800px, 400px), p) It doesn't work great as point plot, there are too many colors. I should do this as a bar chart, but I still need to implement colors in the bar geometry. |
This might be easier to comprehend as a "relative to C" metric to get rid of the baseline shift for the various algorithms. |
@dcjones Really nice plots! I really have to learn Julia and its plotting system :-) Otherwise I think that these data are very difficult to plot in an effective way. One of the best way is probably to plot side by side one language with only another one. |
Very pretty! Unfortunately, I'm having a bit of trouble running this against master (or 0.1). Now that 0.1 is out hopefully people can stabilize packages against that. |
@franko, at last, I got it to compile. I get two errors, though, because math.min and sting.format choke on cdata (it also does in LuaJIT, but I thought that you had tweaked it in the GSL Shell... apparently not). Wrapping them in tonumber() does the trick. I get better results in parse_int and quicksort using a pure LuaJIT implementation (replacing cdata numbers with Lua numbers and the
Do you mind if I use them instead of yours ? |
@StefanKarpinski I just updated, I think I'm caught up to 0.1 now. Not to drag this off-topic, but would this be a good time to start tagging packages? |
I was just thinking about that and I'm not sure. Lemme consider it a bit more. |
@pao It's not much better. using Compose, Gadfly, DataFrames
benchmarks = DataFrame(readcsv("benchmarks.csv"),
["Language", "Benchmark", "Time"])
benchmarks = merge(benchmarks, subset(benchmarks, :(Language .== "c")),
"Benchmark", "outer")
within!(benchmarks, :(Time ./= Time_1))
p = plot(benchmarks,
{:y => "Benchmark", :x => "Time", :color => "Language"},
Geom.point, Scale.x_log2, Guide.XLabel("Time (Log2 Relative to C)"))
draw(SVG("benchmarks.svg", 800px, 400px), p) @franko Yeah, I think I'll do a bar chart with a bar for each language grouped by benchmark, or something of the sort. A good opportunity to force me to actually implement that. :) |
I think it's a bit clearer, anyways, even if it's hard to pick out a particular performer. Picking good colors is an old problem, but see e.g. http://colorbrewer2.org/. Or perhaps port @timholy's MATLAB code up on File Exchange http://www.mathworks.us/matlabcentral/fileexchange/29702 |
That's interesting. I have a lot of color spaces implemented, but haven't spent a lot of time on actually selecting colors. I'm just choosing equidistant hues in LAB space. Maybe this would be clear enough if I took "C" out (since it's always 1) and experimented with color scales. |
You're also not fixing chroma and lightness like I am. It makes sense to vary only hue (or only lightness) to show quantitative data, but qualitative scales like this might benefit by choosing from a wider range of colors. I might try adding colorbrewer's scales, but I tend to prefer algorithms to anything "hand curated". If anyone knowns of any papers on maximizing distinguishability with constraints for colorblindness (and maybe printability), I'd be interested. |
I didn't do a deep search to see what ColorBrewer is doing behind the scenes--I can't imagine those were all created by hand, but maybe they were? Penn State is mentioned in the footer, so there might be some publications. Also, should we move this particular discussion to the Gadfly tracker? |
Stephen D. Gardner, 2005, Evaluation of the ColorBrewer Color Schemes for Accommodation of Map Readers with Impaired Color Vision (6.1MB PDF) Available from http://www.personal.psu.edu/cab38/ |
Is this ok to merge now? |
Not yet, I have a few tweaks to make. |
... since the GSL and Julia use the same PRNG, and LuaJIT does not.
It's ready. |
My machine is no longer a reasonable system to use for the official Julia benchmarks – it makes sounds like a dying animal. We should start using julia.mit.edu. Among other things, that means we're going to need to get a license to run Matlab on there. |
MIT has a site license for matlab, I believe. |
Would be great update the benchmark http://julialang.org/ before April 25 ( Ubuntu release ) and use Julia 0.1.2 on it. P.D.: Comparison 0.1.2 ( julia.0.1 ) with actual master 0.2 ( julia-m )
|
We should probably do it right away. Could you file as an issue on the julialang.github.com repo? |
@ViralBShah there is already an issue on that repo: JuliaLang/www_old.julialang.org#23 |
Thanks. |