Developers
August 12, 2020

Julia 1.5 Released: Why You Should Take a Look

Julia is a powerful, high performance language. The latest release only adds to its advantages.

Julia has just released version 1.5, including a slew of new features designed to improve upon the young language. For existing Julia programmers, as well as those looking to take it up, this release improves upon the things that make Julia a unique entry in the world of programming.

What Is Julia?

When it comes to programming languages, programmers must often make a choice between ease-of-use and performance. High-level languages—such as Ruby, Python, Xojo, JavaScript, Visual Basic and others—are relatively easy to learn and even master. Many of these languages achieve their ease-of-use by providing a measure of abstraction, hiding away the low-level elements to reduce the barrier-to-entry. Unfortunately, the tradeoff is often lower performance.

In contrast, low-level languages—such as Assembly or C—offer very little abstraction. As a result, while harder to learn, these languages offer much faster performance than their high-level counterparts.

Julia is one of those rare languages that strives, and largely succeeds, at providing the best of both worlds. The work of Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and Alan Edelman, Julia was released in 2012. From the very beginning, its creators specifically set out to offer ease-of-use and low-level performance.

Much like Python or Ruby, Julia has a relatively simple syntax that makes it easy for new developers to pick up. The language also offers dynamic typing, giving programmers the ability to declare variables without specifying their type.

At the same time, however, Julia’s performance is top-notch. One of the big contributors to this performance is the fact that Julia is a compiled language, not interpreted. Interpreted languages use an interpreter to translate the code on-the-fly into something the computer can understand. Obviously, this translation layer can result in significant overhead.

A compiled language, on the other hand, takes the code and compiles it into native machine code. Many languages, such as Swift, C++ and others do this once, when the programmer compiles, or “builds,” the application.

Julia uses a variation of this, called just-in-time (JIT) compilation. This means the code is compiled at run time, as the application is being used. Languages such as Java have JIT compilation. In many instances, languages that feature JIT compilation are slower than languages that compile when the application is built.

Julia, however, implements JIT compilation a little differently, giving it significantly better performance than other languages. For example, rather than compiling the code as it is being run, Julia’s JIT compiler compiles functions before they run. In addition, some JIT compiled languages translate code into bytecode that is run via a virtual machine. In contrast, Julia compiles directly to native machine code. Both of these features lead to significant performance improvements, putting Julia’s performance on par with C—often considered the gold standard among programming languages.

Julia also supports parallelism, where large tasks are divided into smaller ones that can be handled simultaneously. While other languages offer parallel computing, Julia’s approach tends to be simpler.

Because of these advantages, Julia has gained significant momentum in data processing, where its performance helps it tackle complex analysis. For example, the Federal Reserve Bank of New York found that Julia provided roughly 10X better performance than MATLAB when modeling the US economy.

Version 1.5: Making a Good Thing Even Better

Unlike many other development languages, Julia does not release new versions around specific features, relying on a timed release schedule. As a result, some releases have a slew of new features, while others are more modest.

Version 1.5 is one of the larger releases, covering a wealth of new abilities. One such improvement is how the language handles struct layouts and allocation optimizations.

“Prior to this release, layout optimizations for immutable objects had a significant limitation: if an immutable object pointed to a heap-allocated, mutable object, it would itself need to be heap-allocated,” write Julia’s Jeff Bezanson & Stefan Karpinski. “That was an artifact of how the garbage collector and code generator worked: it was simpler for there to be a one-to-one correspondence between object fields and GC roots. For 1.5, Jameson Nash did a redesign to fix this, allowing the compiler to track multiple roots inside object fields.

“As a result of this work, arbitrary immutable objects—regardless of whether they have fields that reference mutable objects or not—can now be stack allocated, passed and returned by value, and stored inline in arrays and other objects. In short, immutable structs that refer to mutable values are now just as efficient as immutable structs that only refer to other immutable objects. (There are some size-based limits to which structs can be stack allocated, but they are unlikely to be exceeded in practice.)”

Version 1.5 also includes improvements to parallelism, including improving thread safety. This release also provides the ability to set the optimization level per-module, improving compilation time. In addition, the team worked to improve compile times in general, and version 1.5 provides as much as a 38% improvement in some operations.

This version has a slew of other features, including implicit keyword argument values, REPL behavior that returns to what it was in version 0.6 and earlier, improved C call syntax, faster random numbers and automatic rr-based bug reporting, not to mention that Pkg is now the default package manager.

Conclusion

Without a doubt, Julia 1.5 represents a significant improvement to an already innovative and unique language. New developers, as well as experienced Julia users, will benefit from the improvements.

TagsJuliaJulia 1.5Programming LanguageSwiftC++
Matt Milano
Technical Writer
Matt is a tech journalist and writer with a background in web and software development.

Related Articles

Back
DevelopersAugust 12, 2020
Julia 1.5 Released: Why You Should Take a Look
Julia is a powerful, high performance language. The latest release only adds to its advantages.

Julia has just released version 1.5, including a slew of new features designed to improve upon the young language. For existing Julia programmers, as well as those looking to take it up, this release improves upon the things that make Julia a unique entry in the world of programming.

What Is Julia?

When it comes to programming languages, programmers must often make a choice between ease-of-use and performance. High-level languages—such as Ruby, Python, Xojo, JavaScript, Visual Basic and others—are relatively easy to learn and even master. Many of these languages achieve their ease-of-use by providing a measure of abstraction, hiding away the low-level elements to reduce the barrier-to-entry. Unfortunately, the tradeoff is often lower performance.

In contrast, low-level languages—such as Assembly or C—offer very little abstraction. As a result, while harder to learn, these languages offer much faster performance than their high-level counterparts.

Julia is one of those rare languages that strives, and largely succeeds, at providing the best of both worlds. The work of Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and Alan Edelman, Julia was released in 2012. From the very beginning, its creators specifically set out to offer ease-of-use and low-level performance.

Much like Python or Ruby, Julia has a relatively simple syntax that makes it easy for new developers to pick up. The language also offers dynamic typing, giving programmers the ability to declare variables without specifying their type.

At the same time, however, Julia’s performance is top-notch. One of the big contributors to this performance is the fact that Julia is a compiled language, not interpreted. Interpreted languages use an interpreter to translate the code on-the-fly into something the computer can understand. Obviously, this translation layer can result in significant overhead.

A compiled language, on the other hand, takes the code and compiles it into native machine code. Many languages, such as Swift, C++ and others do this once, when the programmer compiles, or “builds,” the application.

Julia uses a variation of this, called just-in-time (JIT) compilation. This means the code is compiled at run time, as the application is being used. Languages such as Java have JIT compilation. In many instances, languages that feature JIT compilation are slower than languages that compile when the application is built.

Julia, however, implements JIT compilation a little differently, giving it significantly better performance than other languages. For example, rather than compiling the code as it is being run, Julia’s JIT compiler compiles functions before they run. In addition, some JIT compiled languages translate code into bytecode that is run via a virtual machine. In contrast, Julia compiles directly to native machine code. Both of these features lead to significant performance improvements, putting Julia’s performance on par with C—often considered the gold standard among programming languages.

Julia also supports parallelism, where large tasks are divided into smaller ones that can be handled simultaneously. While other languages offer parallel computing, Julia’s approach tends to be simpler.

Because of these advantages, Julia has gained significant momentum in data processing, where its performance helps it tackle complex analysis. For example, the Federal Reserve Bank of New York found that Julia provided roughly 10X better performance than MATLAB when modeling the US economy.

Version 1.5: Making a Good Thing Even Better

Unlike many other development languages, Julia does not release new versions around specific features, relying on a timed release schedule. As a result, some releases have a slew of new features, while others are more modest.

Version 1.5 is one of the larger releases, covering a wealth of new abilities. One such improvement is how the language handles struct layouts and allocation optimizations.

“Prior to this release, layout optimizations for immutable objects had a significant limitation: if an immutable object pointed to a heap-allocated, mutable object, it would itself need to be heap-allocated,” write Julia’s Jeff Bezanson & Stefan Karpinski. “That was an artifact of how the garbage collector and code generator worked: it was simpler for there to be a one-to-one correspondence between object fields and GC roots. For 1.5, Jameson Nash did a redesign to fix this, allowing the compiler to track multiple roots inside object fields.

“As a result of this work, arbitrary immutable objects—regardless of whether they have fields that reference mutable objects or not—can now be stack allocated, passed and returned by value, and stored inline in arrays and other objects. In short, immutable structs that refer to mutable values are now just as efficient as immutable structs that only refer to other immutable objects. (There are some size-based limits to which structs can be stack allocated, but they are unlikely to be exceeded in practice.)”

Version 1.5 also includes improvements to parallelism, including improving thread safety. This release also provides the ability to set the optimization level per-module, improving compilation time. In addition, the team worked to improve compile times in general, and version 1.5 provides as much as a 38% improvement in some operations.

This version has a slew of other features, including implicit keyword argument values, REPL behavior that returns to what it was in version 0.6 and earlier, improved C call syntax, faster random numbers and automatic rr-based bug reporting, not to mention that Pkg is now the default package manager.

Conclusion

Without a doubt, Julia 1.5 represents a significant improvement to an already innovative and unique language. New developers, as well as experienced Julia users, will benefit from the improvements.

Julia
Julia 1.5
Programming Language
Swift
C++
About the author
Matt Milano -Technical Writer
Matt is a tech journalist and writer with a background in web and software development.

Related Articles