Julia code can be precompiled to save time loading and/or compiling it on first execution. Precompilation is nuanced because Julia code comes in many flavours, including source text, lowered code, type-inferred code, and various stages of optimization to reach native machine code. We will summarize what has (and hasn't) previously been precompiled, some of the challenges posed by Julia's dynamism, the nature of some recent changes, and prospects for near-term extensions to precompilation.
For more info on the Julia Programming Language, follow us on Twitter: https://twitter.com/JuliaLanguage and consider sponsoring us on GitHub: https://github.com/sponsors/JuliaLang
Contents
00:00 Welcome!
00:30 Julia run fast and you can write code in it quickly
03:20 But compilation takes time
05:44 The two halves of Time to First Execution (TTFX)
06:13 Strategies to reduce compilation time
07:26 Why precompilation is important?
08:24 What gets saved from Julia's compilation pipeline?
12:08 Challenges ahead: invalidation
14:20 Current work on precompilations
16:26 Custom precompilation by creating Startup.jl
17:19 New package: SnoopPrecompile.jl
17:52 Comparing using Startup.jl and Packagecompiler
19:12 Looking ahead: saving native code
20:12 What's needed to support packages in storage file staticdata.c?
22:16 Challenges that we faced
24:49 GPUCompiler.jl approach and its developments
26:31 Moving from sysimage to pkgimage?
27:12 Relocating code
28:18 Diagram illustrating relocation of code
29:00 Next steps
30:18 A hopeful future
31:36 Closing remarks
Want to help add timestamps to our YouTube videos to help with discoverability? Find out more here: https://github.com/JuliaCommunity/YouTubeVideoTimestamps
Interested in improving the auto generated captions? Get involved here: https://github.com/JuliaCommunity/YouTubeVideoSubtitles