Why use Julia Language!

Julia has been around since a couple of years now and continues to attract new users. Julia Language uses concepts from well established programming languages in order to create an easy-to-use high performance software.

The official website describes Julia as

“a high-level, high-performance dynamic programming language for numerical computing. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library. Julia’s Base library, largely written in Julia itself, also integrates mature, best-of-breed open source 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.”

Julia incorporates various key advantages of other languages. First, Julia reaches the speed of compiled languages such as C++ and Fortran. Furthermore, Julia provides the dynamism of high-level languages, such as Ruby or Python as well as the mathematical notations of MATLAB or Octave. Last but not least, Julia provides the statistical ease of R and the general usage of Python. Combing these elements makes Julia an incredible powerful language.

First, Julia is a multiple dispatch language. That is, in a multiple dispatch language, a function call may dispatch to different functions depending on the type called at run-time, which stands in contrast to a single dispatch language, in which a function call always sends to the same function. A multiple dispatch environment ensures that, depending on the variables provided to the function, different results will be produced.

A additional feature of Julia is speed. Julia complies codes on the fly, reaching an incredible velocity. Julia combines the method of interpreting languages, such as Python, that transform the code into bytecode on the fly, with compiled languages (C/Fortran), that compile their code into machine code and then running the resulted executable. This approach allows Julia to produce similar speeds to C, while having a code similar to Python or MATLAB.

Similar to R, Packages are an important feature of Julia. Due to its built-in package manager, it already has over 1500 registered packages (and the number keeps growing). Julia also provides the possibility to resort to C, Fortran and Python packages, making it easy to run existing code. Finally, Julias compiler ability encourages the community to continues to develop packages in pure Julia.

The most amazing feature of Julia is its parallelism. In Julia, one can parallelize directly from command line by calling the desired script with a given number of cores. Additionally, it is possible to send tasks to different threads directly from code. Lastly, Julia can run loops in parallel directly. That is, one does not need to designating different threads to each loop.

While Julia offers awesome features, it also comes with some pitfalls. First, Julia hashes its dictionaries differently to Python, which currently can prove slower. Second, while not necessary a disadvantage, in Julia Language arrays are 1-indexed, along with Fortran array ordering. Thus, depending on the code one uses, it might not be out of the box compatible with Python or C. Furthermore, although it has quite a incredible parallelisation, it is still often not fast enough, and might even slow down execution. Lastly, Julia is still in beta (currently v0.6). Hence, it is not ensured that future versions of Julia are backwards compatible, possible rendering present code obsolete in the future.

Overall, Julia was created to overcome the programming time vs runtime problem. It has several advantages, including speed, familiarity to Python, R and C, multiple dispatch environment, parallelism, a large amount of packages, and the possibility to incorporate other languages. Nevertheless, Julia also comes with some drawbacks, such as still being in beta, indexing and hashing.

Advertisements
This entry was posted in Computing and Others and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s