# \#precompile

**URL:** https://discourse.julialang.org/tag/precompile/1356.md

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

---

## [Why is v1.12 "more prone to invalidations"?](https://discourse.julialang.org/t/why-is-v1-12-more-prone-to-invalidations/134327)

<div class="topic-metadata">

**Author:** [@mattsignorelli](https://discourse.julialang.org/u/mattsignorelli)\
**Replies:** 0\
**Last updated:** [December 3, 2025, 12:15pm UTC](https://discourse.julialang.org/t/why-is-v1-12-more-prone-to-invalidations/134327 "2025-12-03T12:15:43Z")

</div>

When v1.12.0 was first released some time ago, my precompile script immediately stopped being effective, even though my code was unchanged. In particular, it was ineffective if IJulia.jl was also loaded. The full details…

---

## [How to avoid code getting precompiled because it gets executed while the package is being defined?](https://discourse.julialang.org/t/how-to-avoid-code-getting-precompiled-because-it-gets-executed-while-the-package-is-being-defined/126890)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [March 13, 2025, 2:12am UTC](https://discourse.julialang.org/t/how-to-avoid-code-getting-precompiled-because-it-gets-executed-while-the-package-is-being-defined/126890 "2025-03-13T02:12:17Z")

</div>

Often times I have some code in a package that executes only during precompilation, not at run time. AFAIK Julia saves the MethodInstances of all such compiled Methods into the precompilation files, for some reason. How …

---

## [Fine grained control of \_\_precompile\_\_(false)?](https://discourse.julialang.org/t/fine-grained-control-of-precompile-false/124811)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 3\
**Last updated:** [January 18, 2025, 3:28pm UTC](https://discourse.julialang.org/t/fine-grained-control-of-precompile-false/124811 "2025-01-18T15:28:35Z")

</div>

I am mostly using Julia 1.11.2 but sometimes 1.10.7. I have some code where a few function definitions cause a precompile warning and then the precompile fails. I have not been able to figure out a way to fix these fun…

---

## [Speculator.jl: Reduce latency through speculative compilation](https://discourse.julialang.org/t/speculator-jl-reduce-latency-through-speculative-compilation/124344)

<div class="topic-metadata">

**Author:** [@jakobjpeters](https://discourse.julialang.org/u/jakobjpeters)\
**Replies:** 17\
**Last updated:** [January 6, 2025, 1:51am UTC](https://discourse.julialang.org/t/speculator-jl-reduce-latency-through-speculative-compilation/124344 "2025-01-06T01:51:40Z")

</div>

Introduction Hi everyone! I’m excited to announce Speculator.jl, which reduces latency by automatically searching for compilable method specializations. Features The primary feature is the function speculate. It wi…

---

## [Failure to precompile FixedEffectModels](https://discourse.julialang.org/t/failure-to-precompile-fixedeffectmodels/116541)

<div class="topic-metadata">

**Author:** [@luke98](https://discourse.julialang.org/u/luke98)\
**Replies:** 5\
**Last updated:** [July 6, 2024, 8:03am UTC](https://discourse.julialang.org/t/failure-to-precompile-fixedeffectmodels/116541 "2024-07-06T08:03:36Z")

</div>

Hi All, I am new to Julia. I am trying to use the package FixedEffectModels. After adding the Package I am trying to run the code as provided in the Readme file of the github package: using DataFrames, RDatasets, Fixe…

---

## [How to disable precompile statements while building Julia?](https://discourse.julialang.org/t/how-to-disable-precompile-statements-while-building-julia/103461)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 2\
**Last updated:** [September 2, 2023, 12:15pm UTC](https://discourse.julialang.org/t/how-to-disable-precompile-statements-while-building-julia/103461 "2023-09-02T12:15:24Z")

</div>

I have added a Make.user with the content $ cat Make.user JULIA\_PRECOMPILE ?= 0 but when I build Julia (using make), I find Collecting and executing precompile statements └ Collect (Basic: ✓ 871, REPL 39/39: ✓ 1862) =\>…

---

## [Patterns for precompiling workloads that could error](https://discourse.julialang.org/t/patterns-for-precompiling-workloads-that-could-error/99156)

<div class="topic-metadata">

**Author:** [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Replies:** 0\
**Last updated:** [May 20, 2023, 10:02am UTC](https://discourse.julialang.org/t/patterns-for-precompiling-workloads-that-could-error/99156 "2023-05-20T10:02:21Z")

</div>

I’ve been thinking about precompilation and code that could error. In this situation, I would like to run a workload that might throw an error during precompilation. The workload is just for optimization, an error here s…

---

## [Precompiling my own functions returns true/false](https://discourse.julialang.org/t/precompiling-my-own-functions-returns-true-false/2303)

<div class="topic-metadata">

**Author:** [@BVPs](https://discourse.julialang.org/u/BVPs)\
**Replies:** 8\
**Last updated:** [February 27, 2017, 6:09pm UTC](https://discourse.julialang.org/t/precompiling-my-own-functions-returns-true-false/2303 "2017-02-27T18:09:09Z")

</div>

Hello. I wrote a set of functions myself (with julia v0.5.0), and wanted to precompile them using precompile, e.g., precompile(myfunc, (Matrix{Float64}, Vector{Int64})), etc. Now, precompile returns true on some of my fu…
