Sign up FAST! Login

A Beginner’s Look at Julia

Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library. The library, largely written in Julia itself, also integrates mature, best-of-breed C and Fortran libraries for linear algebra, random number generation, signal processing, and string processing. In addition, the Julia developer community is contributing a number of external packages through Julia’s built-in package manager at a rapid pace. IJulia, a collaboration between the IPython and Julia communities, provides a powerful browser-based graphical notebook interface to Julia.

Julia programs are organized around multiple dispatch; by defining functions and overloading them for different combinations of argument types, which can also be user-defined. For a more in-depth discussion of the rationale and advantages of Julia over other systems, see the following highlights or read the introduction in the online manual.

mystic pizza

Julia’s LLVM-based just-in-time (JIT) compiler combined with the language’s design allow it to approach and often match the performance of C. To get a sense of relative performance of Julia compared to other languages that can or could be used for numerical and scientific computing, we’ve written a small set of micro-benchmarks in a variety of languages. The source code for the various implementations can be found here: C, Fortran, Julia, Python, Matlab/Octave, R, and JavaScript. We encourage you to skim the code to get a sense for how easy or difficult numerical programming in each language is. The following micro-benchmark results are from a MacBook Pro with a 2.53GHz Intel Core 2 Duo CPU and 8GB of 1066MHz DDR3 RAM:

FortranJuliaPythonMatlabOctaveRJavaScriptGCC 4.5.112b1d5a72.7.3R2011a3.42.14.2V8 benchmark times relative to C (smaller is better).

C compiled by Clang 4.0, taking best timing from all optimization levels (-O0 through -O3).The Python implementations of rand_mat_stat and rand_mat_mul use NumPy (v1.5.1) functions; the rest are pure Python implementations.

Stashed in:

To save this post, select a stash from drop-down menu or type in a new one:

Dear Panda or Whale, (not sure which of you does the tech support, more probably Whale as you have better connectivity down there)

That's so weird... this post is a little funky - there was a hiccup as I was saving it - and I didn't see confirmation, so I re-posted a duplicate. Now I can't Edit this or remove it. What's going on...?


You May Also Like: