# \#compilation

**URL:** https://discourse.julialang.org/tag/compilation/154.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Building an incremental sysimage in seconds instead of minutes](https://discourse.julialang.org/t/building-an-incremental-sysimage-in-seconds-instead-of-minutes/139352)

<div class="topic-metadata">

**Author:** [@melevy](https://discourse.julialang.org/u/melevy)\
**Replies:** 0\
**Last updated:** [September 10, 2026, 8:56pm UTC](https://discourse.julialang.org/t/building-an-incremental-sysimage-in-seconds-instead-of-minutes/139352 "2026-09-10T20:56:55Z")

</div>

Disclaimer: this post was written using AI, but I did my best to make this informative and useful for others. The post has been flagged for being an advertisement, it is not. I hope it passes this time. This is a resear…

---

## [Keeping track of 'trimming safe' packages](https://discourse.julialang.org/t/keeping-track-of-trimming-safe-packages/138649)

<div class="topic-metadata">

**Author:** [@langestefan](https://discourse.julialang.org/u/langestefan)\
**Replies:** 4\
**Last updated:** [August 18, 2026, 12:34pm UTC](https://discourse.julialang.org/t/keeping-track-of-trimming-safe-packages/138649 "2026-08-18T12:34:00Z")

</div>

The page at System Image Building · The Julia Language states: Package authors may wish to test that their package is “trimming safe”, however this is impossible in general. Trimming is only expected to work given conc…

---

## [Can Symbolics/MTK split the generated RHS into multiple smaller functions?](https://discourse.julialang.org/t/can-symbolics-mtk-split-the-generated-rhs-into-multiple-smaller-functions/138469)

<div class="topic-metadata">

**Author:** [@Bart\_van\_de\_Lint](https://discourse.julialang.org/u/Bart_van_de_Lint)\
**Replies:** 1\
**Last updated:** [July 26, 2026, 7:39pm UTC](https://discourse.julialang.org/t/can-symbolics-mtk-split-the-generated-rhs-into-multiple-smaller-functions/138469 "2026-07-26T19:39:39Z")

</div>

I have a large ModelingToolkit model. mtkcompile inlines ~32k observed equations into a single big RHS function in around 60 seconds, and first-call compilation of that one function takes \>1000 s (dominated by type infer…

---

## [The compilation time of max with dot distribution is kinda insane. workarounds?](https://discourse.julialang.org/t/the-compilation-time-of-max-with-dot-distribution-is-kinda-insane-workarounds/138440)

<div class="topic-metadata">

**Author:** [@rokke](https://discourse.julialang.org/u/rokke)\
**Replies:** 7\
**Last updated:** [July 25, 2026, 1:50am UTC](https://discourse.julialang.org/t/the-compilation-time-of-max-with-dot-distribution-is-kinda-insane-workarounds/138440 "2026-07-25T01:50:51Z")

</div>

I have a function that returns a tuple of two ints, and I want to find the largest int that shows up in each index. we’ve got this function in base called max which will do this for you, but the compilation time is kinda…

---

## [What is \`outputting sysimage file\` actually doing?](https://discourse.julialang.org/t/what-is-outputting-sysimage-file-actually-doing/138364)

<div class="topic-metadata">

**Author:** [@rokke](https://discourse.julialang.org/u/rokke)\
**Replies:** 3\
**Last updated:** [July 20, 2026, 3:05pm UTC](https://discourse.julialang.org/t/what-is-outputting-sysimage-file-actually-doing/138364 "2026-07-20T15:05:51Z")

</div>

it strikes me as odd that the longest step of building julia (like, from source with make) is ‘outputting’, which I think of as just writing something already in memory to disk. this step is pretty consistently the longe…

---

## [\[ANN\] AppBundler v1.0: Native Installers for Julia Applications](https://discourse.julialang.org/t/ann-appbundler-v1-0-native-installers-for-julia-applications/136438)

<div class="topic-metadata">

**Author:** [@Janis\_Erdmanis](https://discourse.julialang.org/u/Janis_Erdmanis)\
**Replies:** 8\
**Last updated:** [March 29, 2026, 9:21pm UTC](https://discourse.julialang.org/t/ann-appbundler-v1-0-native-installers-for-julia-applications/136438 "2026-03-29T21:21:59Z")

</div>

Packaging a Julia application into a native installer has traditionally meant wrestling with platform-specific tooling on each target system. I am pleased to announce AppBundler v1.0 changes that. Turn any Julia applicat…

---

## [AOT compilation error on Julia 1.12 due to strip-metadata or filter\_stdlibs](https://discourse.julialang.org/t/aot-compilation-error-on-julia-1-12-due-to-strip-metadata-or-filter-stdlibs/133218)

<div class="topic-metadata">

**Author:** [@KSepetanc](https://discourse.julialang.org/u/KSepetanc)\
**Replies:** 3\
**Last updated:** [March 23, 2026, 7:08pm UTC](https://discourse.julialang.org/t/aot-compilation-error-on-julia-1-12-due-to-strip-metadata-or-filter-stdlibs/133218 "2026-03-23T19:08:14Z")

</div>

Normally I use create\_app from PackageCompiler.jl and it completes successfully on Julia 1.11 with complex case (multiple dependencies). On 1.12 it fails so I decided to narrow down the example. Using PackageCompiler 2.2…

---

## [Self-contained juliac demonstration](https://discourse.julialang.org/t/self-contained-juliac-demonstration/134366)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 15\
**Last updated:** [March 14, 2026, 5:29am UTC](https://discourse.julialang.org/t/self-contained-juliac-demonstration/134366 "2026-03-14T05:29:34Z")

</div>

I was looking for a completely self-contained tutorial or demonstration on how to use the juliac command line from JuliaC.jl and did not find one. I created this short demonstration below. Steps Step 1: Install Julia 1.…

---

## [Generating JuliaC libraries on Windows](https://discourse.julialang.org/t/generating-juliac-libraries-on-windows/135865)

<div class="topic-metadata">

**Author:** [@JackC](https://discourse.julialang.org/u/JackC)\
**Replies:** 3\
**Last updated:** [March 4, 2026, 2:24pm UTC](https://discourse.julialang.org/t/generating-juliac-libraries-on-windows/135865 "2026-03-04T14:24:08Z")

</div>

Hi all, I have been trying to use the new JuliaC capabilities in 1.12 (currently on 1.12.5). I have been able to compile executable binaries with some success, however I haven’t been able to successfully compile C calla…

---

## [Outputs of JuliaC compiled functions question](https://discourse.julialang.org/t/outputs-of-juliac-compiled-functions-question/135678)

<div class="topic-metadata">

**Author:** [@JackC](https://discourse.julialang.org/u/JackC)\
**Replies:** 3\
**Last updated:** [February 16, 2026, 11:29pm UTC](https://discourse.julialang.org/t/outputs-of-juliac-compiled-functions-question/135678 "2026-02-16T23:29:41Z")

</div>

I’ve been experimenting with the new JuliaC functionality for generating small binaries introduced in 1.12. I have been able to successfully compile and run example programs (such as the ones provided in this repo). Howe…

---

## [World Age for beginners: one way to compile a dynamic language](https://discourse.julialang.org/t/world-age-for-beginners-one-way-to-compile-a-dynamic-language/134402)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 2\
**Last updated:** [December 6, 2025, 10:01pm UTC](https://discourse.julialang.org/t/world-age-for-beginners-one-way-to-compile-a-dynamic-language/134402 "2025-12-06T22:01:10Z")

</div>

0. Preface (skippable) The Manual tries to describe the language in a more accessible way, but I’ve felt for a while that world age was unfortunately avoided. In fact, the 1.12 documentation says as much1: World age is…

---

## [Query compiler's effect modeling](https://discourse.julialang.org/t/query-compilers-effect-modeling/134079)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [November 24, 2025, 2:15pm UTC](https://discourse.julialang.org/t/query-compilers-effect-modeling/134079 "2025-11-24T14:15:46Z")

</div>

Before using @assume\_effects, is it possible to check what the compiler already figured out about a function? I can of course do it very indirectly (call the function and see what’s eliminated), but it would be great to…

---

## [Trim Examples](https://discourse.julialang.org/t/trim-examples/133818)

<div class="topic-metadata">

**Author:** [@andreeco](https://discourse.julialang.org/u/andreeco)\
**Replies:** 1\
**Last updated:** [November 12, 2025, 1:25pm UTC](https://discourse.julialang.org/t/trim-examples/133818 "2025-11-12T13:25:36Z")

</div>

Hi, I would like to see some (more) examples of code using the new trim functionality. I did experiment a little and found it difficult to get type stability correctly. Not all that is allowed in Julia JIT is allowed in …

---

## [Precompilation in a sandbox](https://discourse.julialang.org/t/precompilation-in-a-sandbox/132312)

<div class="topic-metadata">

**Author:** [@Chrysoberyl](https://discourse.julialang.org/u/Chrysoberyl)\
**Replies:** 1\
**Last updated:** [September 13, 2025, 5:25am UTC](https://discourse.julialang.org/t/precompilation-in-a-sandbox/132312 "2025-09-13T05:25:03Z")

</div>

I’m making sandboxed and reproducible Julia builds. One way I do this is by compiling each Julia package using Pkg.API.precompile(). I ensure that $JULIA\_DEPOT is set to a list of paths which contains compiled/v1.11/Logg…

---

## [Slow compilation with SecondOrderODEProblem](https://discourse.julialang.org/t/slow-compilation-with-secondorderodeproblem/131749)

<div class="topic-metadata">

**Author:** [@sijo](https://discourse.julialang.org/u/sijo)\
**Replies:** 3\
**Last updated:** [August 28, 2025, 1:55pm UTC](https://discourse.julialang.org/t/slow-compilation-with-secondorderodeproblem/131749 "2025-08-28T13:55:37Z")

</div>

Is the following expected? (DifferentialEquations 7.16 in Julia 1.11.6) using DifferentialEquations function OneDimSpring2!(ddu, du, u, p, t) ddu\[1\] = 1.0 + 1.0/u\[1\]^2 end du0 = \[0.0\] u0 = \[2.0\] tspan = (0.0, 50.0…

---

## [Segmentation fault in executable after compilation with juliac including --trim --experimental arguments](https://discourse.julialang.org/t/segmentation-fault-in-executable-after-compilation-with-juliac-including-trim-experimental-arguments/125303)

<div class="topic-metadata">

**Author:** [@borisjo](https://discourse.julialang.org/u/borisjo)\
**Replies:** 4\
**Last updated:** [August 18, 2025, 9:10pm UTC](https://discourse.julialang.org/t/segmentation-fault-in-executable-after-compilation-with-juliac-including-trim-experimental-arguments/125303 "2025-08-18T21:10:39Z")

</div>

I’m trying out the juliac compilation functionality and I’m getting segmentation faults in my executable. My code I try to compile: module ABCD Base.@ccallable function main()::Cint return 0 end end # Module ABCD…

---

## [TTSX: Recompilation on every run](https://discourse.julialang.org/t/ttsx-recompilation-on-every-run/131003)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 9\
**Last updated:** [July 25, 2025, 12:11pm UTC](https://discourse.julialang.org/t/ttsx-recompilation-on-every-run/131003 "2025-07-25T12:11:20Z")

</div>

Colleagues and I are developing Muscade.jl. Muscade is deliberately putting a high workload on the Julia 1.11 compiler. I have done nothing with module precompilation so far. Thus I have a significant TTFX, but this i…

---

## [Why does it always recompile a package?](https://discourse.julialang.org/t/why-does-it-always-recompile-a-package/131037)

<div class="topic-metadata">

**Author:** [@Kirby\_Zhang](https://discourse.julialang.org/u/Kirby_Zhang)\
**Replies:** 2\
**Last updated:** [July 25, 2025, 1:11am UTC](https://discourse.julialang.org/t/why-does-it-always-recompile-a-package/131037 "2025-07-25T01:11:50Z")

</div>

I have a locally developed package Inherit.jl. It has a \_\_precompile\_\_(true) statement. When I open the package project, importing it does not show any compilation time: K:\\DevDocuments\\fourthwave\\pkg\\Inherit\>more Mani…

---

## [How far does type instability propagate?](https://discourse.julialang.org/t/how-far-does-type-instability-propagate/130350)

<div class="topic-metadata">

**Author:** [@Leo\_I](https://discourse.julialang.org/u/Leo_I)\
**Replies:** 10\
**Last updated:** [July 4, 2025, 8:37am UTC](https://discourse.julialang.org/t/how-far-does-type-instability-propagate/130350 "2025-07-04T08:37:38Z")

</div>

I have a function type\_uint(val::Integer) ::Type{\<:Unsigned} which returns the smallest UInt type that can still represent val without overflowing. I use this everywhere in my code, but only at top level. For example, g…

---

## [Disassociate GC time from compile time](https://discourse.julialang.org/t/disassociate-gc-time-from-compile-time/130194)

<div class="topic-metadata">

**Author:** [@theogf](https://discourse.julialang.org/u/theogf)\
**Replies:** 4\
**Last updated:** [June 26, 2025, 11:41am UTC](https://discourse.julialang.org/t/disassociate-gc-time-from-compile-time/130194 "2025-06-26T11:41:46Z")

</div>

The @timed macro provides a bunch of very interesting stats about GC and compilation time. I wanted to reuse this data to estimate the time excluding compilation and GC. However since (I believe) GC can and will happen …

---

## [Questions about Juliac](https://discourse.julialang.org/t/questions-about-juliac/130213)

<div class="topic-metadata">

**Author:** [@Max\_Pan](https://discourse.julialang.org/u/Max_Pan)\
**Replies:** 1\
**Last updated:** [June 26, 2025, 1:41am UTC](https://discourse.julialang.org/t/questions-about-juliac/130213 "2025-06-26T01:41:11Z")

</div>

At the moment, I am trying to use julia for a real-time system. As of so far, I have done a bunch of benchmarking for julia. So the script below attempts to measure the initial time to run matrix multiplication for two …

---

## [PReLU with long compilation time](https://discourse.julialang.org/t/prelu-with-long-compilation-time/129783)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 1\
**Last updated:** [June 12, 2025, 6:24pm UTC](https://discourse.julialang.org/t/prelu-with-long-compilation-time/129783 "2025-06-12T18:24:35Z")

</div>

Cheers, I have implemented a PReLU nonlinearity that seems to be working quite well in my models, except for the fact the model’s compilation time (\*) is way longer than the equivalent model with ReLU instead. Given my…

---

## [Question about the future of JuliaC](https://discourse.julialang.org/t/question-about-the-future-of-juliac/129228)

<div class="topic-metadata">

**Author:** [@Matt\_jl](https://discourse.julialang.org/u/Matt_jl)\
**Replies:** 10\
**Last updated:** [May 22, 2025, 9:05am UTC](https://discourse.julialang.org/t/question-about-the-future-of-juliac/129228 "2025-05-22T09:05:53Z")

</div>

Hi everyone, I’m definitely not a professional programmer and I don’t have a degree in computer engineering, so please forgive any naive questions — this post comes purely from curiosity. I’ve been using Julia for rese…

---

## [Function compiles twice but is called just once](https://discourse.julialang.org/t/function-compiles-twice-but-is-called-just-once/128536)

<div class="topic-metadata">

**Author:** [@StevenWhitaker](https://discourse.julialang.org/u/StevenWhitaker)\
**Replies:** 4\
**Last updated:** [April 29, 2025, 10:09pm UTC](https://discourse.julialang.org/t/function-compiles-twice-but-is-called-just-once/128536 "2025-04-29T22:09:48Z")

</div>

Consider the following code: julia\> @generated function f(x) @info "Compiling f" return :(x + 1) end f (generic function with 1 method) julia\> function type\_unstable(y::Vector{Number}) …

---

## [Use of anonymous functions has high compilation time](https://discourse.julialang.org/t/use-of-anonymous-functions-has-high-compilation-time/125923)

<div class="topic-metadata">

**Author:** [@thomasc791](https://discourse.julialang.org/u/thomasc791)\
**Replies:** 3\
**Last updated:** [February 14, 2025, 10:17pm UTC](https://discourse.julialang.org/t/use-of-anonymous-functions-has-high-compilation-time/125923 "2025-02-14T22:17:58Z")

</div>

Hi everyone, I am currently struggling with the usage of anonymous functions. I have a function dirichlet! that takes a function as one of its inputs. The function returns a value based on the position x. function diri…

---

## [Pushing the Limits of Small Binary Creation](https://discourse.julialang.org/t/pushing-the-limits-of-small-binary-creation/120989)

<div class="topic-metadata">

**Author:** [@TheCedarPrince](https://discourse.julialang.org/u/TheCedarPrince)\
**Replies:** 7\
**Last updated:** [February 11, 2025, 4:35pm UTC](https://discourse.julialang.org/t/pushing-the-limits-of-small-binary-creation/120989 "2025-02-11T16:35:09Z")

</div>

Hi all, quick story: It was at a hotel bar the other day that @asinghvi17 , @avik , @mortenpi , Professor Rebecca Killick, and I did an impromptu hackathon for about 5 hours to see what could be possible with the newly …

---

## [How to debug the compiler with Debugger.jl](https://discourse.julialang.org/t/how-to-debug-the-compiler-with-debugger-jl/124229)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [December 28, 2024, 1:19pm UTC](https://discourse.julialang.org/t/how-to-debug-the-compiler-with-debugger-jl/124229 "2024-12-28T13:19:15Z")

</div>

For Debugger.jl, I assume compiled mode is enabled by default for @run? How do I disable it? I want to disable it to be able to step through the type inference code in the compiler. Can’t use VS Code’s debugger because i…

---

## [Invalidating the generator of a \`@generated\` function](https://discourse.julialang.org/t/invalidating-the-generator-of-a-generated-function/125164)

<div class="topic-metadata">

**Author:** [@K11BN367](https://discourse.julialang.org/u/K11BN367)\
**Replies:** 1\
**Last updated:** [January 24, 2025, 1:03pm UTC](https://discourse.julialang.org/t/invalidating-the-generator-of-a-generated-function/125164 "2025-01-24T13:03:18Z")

</div>

Hello, i started to investigate the julia internals a bit and toyed around with some code that tries to invalidate the generator of a ‘@generated’ function. I came up with the following code: import Core.Compiler.Meth…

---

## [Benchmarking function compile time](https://discourse.julialang.org/t/benchmarking-function-compile-time/125013)

<div class="topic-metadata">

**Author:** [@AntonReinhard](https://discourse.julialang.org/u/AntonReinhard)\
**Replies:** 10\
**Last updated:** [January 22, 2025, 10:33am UTC](https://discourse.julialang.org/t/benchmarking-function-compile-time/125013 "2025-01-22T10:33:11Z")

</div>

I have some code that generates functions at runtime that vary greatly in size (10 to 100k lines of code). I’d like to benchmark the compilation of these functions. Is there any intended way to do this? Something like a …

---

## [Understanding compilation with Optim.jl and OrdinaryDiffEq.jl](https://discourse.julialang.org/t/understanding-compilation-with-optim-jl-and-ordinarydiffeq-jl/124566)

<div class="topic-metadata">

**Author:** [@ysfoo](https://discourse.julialang.org/u/ysfoo)\
**Replies:** 7\
**Last updated:** [January 13, 2025, 8:05am UTC](https://discourse.julialang.org/t/understanding-compilation-with-optim-jl-and-ordinarydiffeq-jl/124566 "2025-01-13T08:05:54Z")

</div>

I’m currently working on numerical optimisation problems that involve solving ODEs, similar to this. I’m trying to understand recurring TTFX when I repeatedly run variations of numerical optimisation problems. Here’s th…

[Next page](https://discourse.julialang.org/tag/compilation/154.md?match_all_tags=true&page=1&tags%5B%5D=compilation)
