Julia 1.12 adds trimming functionality

Julia 1.12 adds trimming functionality

Julia 1.12 was released with a new trim function, the ability to redefine structures and the final switch to partitioned semantics.


Julia is the dynamic engineering computing language optimized for running MATLAB and R programs. Development of Julia began at MIT in 2009 and has continued to grow in popularity, recently becoming one of the six most popular languages ​​for machine learning projects on GitHub.

July logo1

The new trim option is experimental in this version. It is designed to create smaller binaries by removing code that is proven not to be reachable from entry points. Developers can mark entry points using the Base.Experimental.entrypoint function. The Julia developers say that not all code is expected to work with this option and that there may be problems since it is experimental code.

The ability to redefine types including structs has been added to extend the previous support for constant redefinition that was added in a previous release. This is now well defined and follows World Age semantics. The developers say that work is also underway in Revise.jl to automatically redefine functions for replaced bindings. This should significantly reduce the number of times you have to restart Julia while iterating on a piece of code.

This release also added new trace flags and macros for checking what Julia compiles, showing how long each compiled method took (in milliseconds) to reach the corresponding precompile(…) line. This makes it easier to identify costly compilations. There are also two new macros for ad hoc tracing without restarting Julia.

There are two new multithreading features. By default, Julia now starts with an interactive thread (in addition to the default thread) in which REPL and other interactive operations are performed. By separating this from the standard thread pool, the REPL can perform operations such as autocomplete queries in parallel with user code execution, resulting in a more responsive interactive experience.

Another improvement means that thread settings take into account CPU affinity settings, such as those set via CPU set, task set and cgroups.

Another notable change is the ability to build Julia and LLVM using the Binary Optimization and Layout Tool (BOLT). BOLT is an LLVM post-link optimizer that improves runtime performance by rearranging functions and basic blocks, splitting hot and cold code, and folding identical functions. Julia now supports building BOLT-optimized versions of libLLVM, libjulia-internal, and libjulia-codegen.

This would reduce compilation and execution time for common workloads. The team says all-inference benchmarks improve by about 10%, an LLVM-heavy workload shows a similar gain of about 10%, and corecompiler.ji build with BOLT improves by 13-16%. When combined with PGO and LTO, overall improvements of up to ~23% were observed.

Julia 1.12 is now available.

July logo1

More information

Julia website

Related articles

Julia makes her debut in the TIOBE Top 20

Julia 1.9 adds native code caching

Julia 1.8 improves Apple Silicon support

Julia Language Creators awarded Numerical Software Prize

To be notified of new articles on I Programmer, subscribe to our weekly newsletter, subscribe to the RSS feed and keep following us Twitter, Facebook or LinkedIn.

banner

Pico book


Comments

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

Leave a comment

Your email address will not be published. Required fields are marked *