Julia is a new language for technical computing that combines interactive scripting convenience with high performance. Reproducible environments make it possible to recreate the same Julia environment every time, across platforms, with pre-built binaries.
Julia also uses multiple-dispatch as a paradigm, which makes it easy to express many object-oriented and functional programming patterns. Julia is an open-source project with over 1,000 contributors. It is made available under the MIT license.
The [source code] for Julia (https://github.com/JuliaLang/julia) is available on GitHub.
Imagine you have been given blue sticks in one bag and red sticks in another bag. Your job is to glue one red stick with one blue stick as quickly as possible. There are two ways in which you could approach this task:
Take a red and a blue stick at the same time and glue them together. Repeat this process until your bags of sticks are empty.
Line up all the red sticks on one side and all the blue sticks on another(like Kit Kats). Then, glue them together in one go.
It seems obvious that the second method will be faster because repeatedly going back to do the same procedure (as in method 1)seems tiresome and slow.
Now, replace the bags with arrays and the blue and red sticks with a random integer. Replace the act of applying glue with the addition operator. The first method can be referred to as looping, and the second can be referred to as vectorization.
Take a look at the following illustration to visually understand what vectorization is:
The @simd
macro gives the compiler license to vectorize without checking if it will change the program’s visible behavior. The vectorized code will behave as if the code were written to operate on chunks of the arrays.
Observe the drastic change in run time due to vectorization. When scaled up on huge amounts of data, in tera-bytes, this difference in runtime can prove to be a substantial change.
Free Resources