Following three beta releases and three release candidates, version 1.9 of the Julia programming language has been released. This brings a number of updates, including the ability to cache native code, package extensions, and heap snapshots.
With the introduction of native code caching, package authors can now utilize precompile statements or workloads with PrecompileTools in order to cache critical routines earlier on. Users also have the ability to build custom local “Startup” packages that load dependencies and precompile workloads specifically for their day-to-day work.
However, the company stated that with this capability comes an increase in precompilation time by ten to fifteen percent, and cache files have grown because of the storage of more data and the use of a different serialization format.
Next, the introduction of package extensions automatically loads a module when a set of packages are loaded. The module is contained in a file in the ext directory of the parent package and loads the “weak dependency” and extend methods.
This feature is intended to reduce the amount of capabilities a customer is paying for that they do not actually use. Package extensions also allow for the precompilation of conditional code and the addition of capability constraints on weak dependencies.
Julia 1.9 also brings heap snapshots that can be examined using Chrome DevTools. To create a heap snapshot, the user must use the Profile package and call the take_heap_snapshot function.
Additionally, to simplify the process of identifying the total number of objects retained, customers can utilize the all_one=true argument and every object’s size will be reported as one, so they can focus more on the number of objects.
A new command flag had also been introduced, –heap-size-hint=<size>. With this, users can set a limit on memory usage and the garbage collector will then work harder to clean up memory that is not used.
“Julia is incredibly attractive for people who have really demanding computational needs,” said Tim Holy, professor of neuroscience at Washington University School of Medicine and one of the core contributors behind the update. “You can think of previous versions of Julia like a jet airplane: a fantastic way to travel long distances, but probably not your preferred vehicle for going to the grocery store. Julia’s speed on big tasks arises from its ability to generate high-quality machine code; but generating such code takes time, and for a simple task it could mean spending more time generating code than running it. It’s a bit unfortunate for a new user, who has heard so much about Julia’s speed, to have their first experience be waiting for it to compile lots of package code before they can start doing anything useful. No matter how fast it runs once it’s ready, that’s not the best first impression.”
To read the full list of features, visit the website.
The post Julia 1.9 delivers native code caching appeared first on SD Times.
from SD Times https://ift.tt/u82wxgb
Comments
Post a Comment