Julia 1.5 Improves Struct Layout Support
Written by Kay Ewbank   
Monday, 10 August 2020

Julia has been updated with improvements including struct layouts and allocation optimizations, and stabilization of the multithreading API.

Julia is a dynamic language for technical computing that is especially good at running MATLAB and R-style programs. Development began on Julia at MIT in 2009, and has increased in popularity, recently becoming one of the top six languages for machine learning projects on GitHub.

.julialogo1

The development team says this release brings a major, long-desired optimization that can significantly reduce heap allocations in some workloads. Prior to this release, layout optimizations for immutable objects had a significant limitation requiring heap allocation. This has been rectified so immutable objects can now be stack allocated, passed and returned by value, and stored more efficiently inline in arrays and other objects

The multithreading API has also been stabilized and improved. Threading support was greatly improved in version 1.3, and is now widely used. It is no longer considered experimental, and the team is marking most of the thread API as stable. Improvements include better thread-safety of top level expressions, and the SuiteSparse bindings are now thread-safe,

Developers can now choose the optimization level per module to reduce compilation delays when code that isn't performance critical. The compiler performance has also been improved, with some packages loading around 40% faster.

The final main change is that 'soft scope' has been added back in this release. In versions of Julia prior to version 1.0, the language made assumptions about whether a variable should to be local or global. The basic rule was that inside of a loop but outside of any function body—in a so-called "soft scope"— non-global variables were created as local to the loop. This was effective, but some developers found it confusing and inconsistent. Julia 1.0 therefore had a simplified rule, where assigning to a variable in a local scope (function or loop) with no existing local created a new local variable.

While simple, this wasn't popular with everyone, to the extent that that the developers of IJulia (a Julia-language backend combined with the Jupyter interactive environment) added code to rewrite inputs in a way that restored the old pre-1.0 scope behavior. As the Julia team point out, having the commonly-used Jupyter front-end behave differently than the default REPL is not a good situation. 

In view of this, the solution in v1.5 is to make the REPL behave like IJulia, and Julia versions 0.6 or earlier while keeping the 1.0 behavior in files, to avoid breaking anybody's code.

julialogo1

More Information

Julia Website

Related Articles

Julia Improves Multithreading

Julia Language Creators Awarded Numerical Software Prize

Julia 0.6 Improves Type Handling

Julia Studio - An IDE For Julia

//No Comment - Ceylon 1.3 & Julia 0.5.0

Julia meets HTML5

Julia Gets $600K

Julia 0.4 Released

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Quantum Computers Really Are A One Trick Pony
17/03/2024

Google is offering $5 million if you can think up a use for a quantum computer. Wait, I thought quantum computers were the next big thing, a revolution! Surely we know what they can do?



100 Episodes of 5mins of Postgres
08/03/2024

The popular PostgreSQL explainer series is celebrating its 100th release and beyond. Let's take a look at what it makes it so special.


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 10 August 2020 )