First impression of Julia 1.14-alpha

Comparing the load times of MTK I get:

  • 4.0s with Julia 1.13.2
  • 3.17s with Julia 1.14+opt

This is a 21% improvement.

The time-to-first-plot (TTFP) with MakieControlPlots shows an even larger improvement:

Julia 1.13.2:

julia> @time @eval (using MakieControlPlots; plotx([1,2,3], rand(3)))
  3.389415 seconds (6.05 M allocations: 381.920 MiB, 13.21% gc time, 15.29% compilation time)

Julia 1.14+opt:

julia> @time @eval (using MakieControlPlots; plotx([1,2,3], rand(3)))
  2.426261 seconds (3.49 M allocations: 286.406 MiB, 14.88% gc time, 9.39% compilation time)

This is a 29% improvement.

Congrats to the developers! :slight_smile:

Big shout out to @ianshmean and @kristoffer.carlsson, who have been doing a lot of great work on TTFX.

Out of curiosity, what do you get if you set the env var

JULIA_OBJCACHE=0

before starting Julia?

A little bit slower, but not much:

export JULIA_OBJCACHE=0; julia +1.14+opt
julia> @time @eval (using MakieControlPlots; plotx([1,2,3], rand(3)))
  2.544094 seconds (3.49 M allocations: 286.391 MiB, 14.28% gc time, 14.67% compilation time)

compared to 2.39s with objcache.

I run a longer test that creates a new system image with 530 packages. You can use the following script to reproduce the test:

#!/bin/bash -eu

# Clone the julia-1.14 branch of KiteControllers into /tmp/test and use a new, empty Julia depot
# in /tmp, install it with bin/install, create a system image with bin/create_sys_image and
# run examples/autopilot.jl with this image in precompile mode (a 30 s simulation, then the
# plot selected in the menu). Needs a display and at least 30 GB of RAM + swap.
# Use test/test_installation to test the installation without a system image.

rm -rf /tmp/testdepot
mkdir /tmp/testdepot
rm -rf /tmp/test
git clone --depth 1 -b julia-1.14 https://github.com/OpenSourceAWE/KiteControllers.jl /tmp/test
cd /tmp/test
export JULIA_DEPOT_PATH=/tmp/testdepot
bin/install
bin/create_sys_image -y
julia_major=$(julia --startup-file=no -e 'print(VERSION.major, ".", VERSION.minor)')
julia --project -t auto -J "bin/kps-image-${julia_major}.so" \
    -e 'using KiteControllers; __PRECOMPILE__ = true; include("examples/autopilot.jl")'

It needs:

  • on Julia 1.13.2 21m57s
  • on Julia 1.14-opt 16m46s

Much better, about 24%. Looking forward to the release!

Based on news.md, appears to be a really exciting release all around!! Great stuff!

@ufechner7 PackageCompiler actually has slowed down a fair bit since 1.11, but there’s some PRs that just went in to regain most of that ground. Worth trying tomorrow’s nightly (once the builds are out)

Even better with Julia 1.14.0-beta1+opt:

# 1.12.7         : 24:40
# 1.13.3         : 21:50
# 1.14+opt-alpha2: 16:15
# 1.14+opt-beta1 : 12:59

This is 41% faster than Julia 1.13.3.

Try PackageCompiler with 1.13.4, which came out yesterday. It should be back to near 1.11 speeds

Yes, 1.13.4 is faster than 1.13.3, but not as fast as 1.14+opt.

# 1.12.7         : 24:40
# 1.13.3         : 21:50
# 1.13.4         : 18:06
# 1.14+opt-alpha2: 16:15
# 1.14+opt-beta1 : 12:59