|Julia 1.9 Adds Native Code Caching|
|Written by Kay Ewbank|
|Tuesday, 23 May 2023|
Julia 1.9 has been released with improvements including caching for native code, heap snapshot support, and improved sorting.
Julia is a dynamic language for technical computing optimized for running MATLAB and R-style programs. Development began on Julia at MIT in 2009, and over the years the language has increased in popularity, recently becoming one of the top six for machine learning projects on GitHub.
The support for native code caching extends the ability to precompile packages to minimize the amount of time needed for compilation when using the package by compiling package code and saving the compiled output to disk as a cache file.
Until this release, only a portion of the compiled code could be saved: types, variables, and methods were saved, as well as the outputs of any type-inference for the argument types specifically precompiled by the package developers. The code that actually runs on your CPU was excluded. This native code can now be cached, resulting in a significant improvement in time-to-first-execution latency. The developers say using native code caching does have the tradeoff that precompilation time increases by 10%-50%, but this is a one-time cost,. Cache files have also become larger due to the storage of more data and the use of a different serialization format.
Another improvement in this release is the ability to generate heap snapshots that can be examined using Chrome DevTools to see how memory is being utilized in your Julia programs.
The default sorting algorithm has also been upgraded. The new algorithm is described as more stable and often faster. According to the developers, a radix sort is now the choice for simple types and orders such as BitInteger, IEEEFloat, and Char sorted in default or reverse order. The radix sort has linear runtime with respect to input size, and the improvement is particularly pronounced for Float16s which is sorted between three and fifty times faster than in the previous version.
Other data types use an internal ScratchQuickSort in most cases, which is stable and generally faster than QuickSort, although it does allocate memory.
Julia 1.9 is available now.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Tuesday, 23 May 2023 )|