Skip to content

Comment on Matlab, R, and Julia: Languages for data analysisparent

Comments

I just ran Wes's benchmarks (not the BLAS call versions) on my machine with a Julia I built on 10/13 (17c3c13), and the timings have indeed improved. For the details, see this gist: https://gist.github.com/3901139 (including the comment I posted on it).

The highlight is

numpy: (x * y).sum() => 41.1 ms

julia: inner(x,y) => 37.4 ms

julia: x*y => 19.5 ms

cython: inner(x,y) => 13.8 ms

The numpy and Julia versions are much easier to write and run.

Disclaimers: I've never written or built cython code before just now, and I think Julia is the coolest.

EDIT: whoops, missed the most important one (inner() written in pure Julia). Added it. Any thoughts on why inner() in Julia isn't faster?

Nice. Thanks for running those. The reason inner isn't faster is probably that we do bounds checks on every array access. This is surprisingly inexpensive on modern hardware but it still takes some time. We're working on a couple of things to address this: generating code so that llvm can more easily hoist bounds checks out of loops, and allowing turning bounds checking off entirely for blocks of Julia code.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.