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


Ruby On Rails Survey
14/09/2020

The latest Ruby on Rails Community Survey from Planet Argon presents a wealth of information about Rails developers, and the tools they choose to use.



OpenBot - SmartPhones Become Robots
30/08/2020

If you, like a lot of people, have a box full of last year's Android phones and can't think of what to do with them - why not build a robot? They have more power than desktop of a few years ago and ar [ ... ]


More News

graphics

 



 

Comments




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

Last Updated ( Monday, 10 August 2020 )