# \#compiler

**URL:** https://discourse.julialang.org/tag/compiler/1056.md

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

---

## [Compiled application startup time under 10ms for 368MB sysimage](https://discourse.julialang.org/t/compiled-application-startup-time-under-10ms-for-368mb-sysimage/139313)

<div class="topic-metadata">

**Author:** [@melevy](https://discourse.julialang.org/u/melevy)\
**Replies:** 0\
**Last updated:** [September 9, 2026, 3:14pm UTC](https://discourse.julialang.org/t/compiled-application-startup-time-under-10ms-for-368mb-sysimage/139313 "2026-09-09T15:14:08Z")

</div>

I build compiled binaries for a network simulator and the process startup time really bugged me. Investigation showed that it is not really inherent to the problem. The image is mmapped fine, but then the loader walks tw…

---

## [Pretty sure this is a severe compiler bug breaking typeof via just a simple parametrized type](https://discourse.julialang.org/t/pretty-sure-this-is-a-severe-compiler-bug-breaking-typeof-via-just-a-simple-parametrized-type/139145)

<div class="topic-metadata">

**Author:** [@skraemer](https://discourse.julialang.org/u/skraemer)\
**Replies:** 17\
**Last updated:** [September 6, 2026, 1:44pm UTC](https://discourse.julialang.org/t/pretty-sure-this-is-a-severe-compiler-bug-breaking-typeof-via-just-a-simple-parametrized-type/139145 "2026-09-06T13:44:47Z")

</div>

The following short code yields an incorrect false (in both v1.12.6/7) from a typeof call, or respectively, typeof(x) changes during runtime even though x does not. Short version struct PT{X} field::X PT(x::X)…

---

## [Compiler/Optimizer Type Inference Bug with Recursive, Nested Types (in v1.12.6)](https://discourse.julialang.org/t/compiler-optimizer-type-inference-bug-with-recursive-nested-types-in-v1-12-6/138526)

<div class="topic-metadata">

**Author:** [@skraemer](https://discourse.julialang.org/u/skraemer)\
**Replies:** 5\
**Last updated:** [July 30, 2026, 1:30pm UTC](https://discourse.julialang.org/t/compiler-optimizer-type-inference-bug-with-recursive-nested-types-in-v1-12-6/138526 "2026-07-30T13:30:44Z")

</div>

The following two examples each produce supposedly impossible results or crash the repl entirely, even though the code is pure Julia. I did not manage to reduce the examples further, at least not by simplifying single li…

---

## [Clarifications on JULIA\_CPU\_TARGET](https://discourse.julialang.org/t/clarifications-on-julia-cpu-target/134807)

<div class="topic-metadata">

**Author:** [@BioTurboNick](https://discourse.julialang.org/u/BioTurboNick)\
**Replies:** 1\
**Last updated:** [January 14, 2026, 3:59pm UTC](https://discourse.julialang.org/t/clarifications-on-julia-cpu-target/134807 "2026-01-14T15:59:05Z")

</div>

I’m looking into adjusting JULIA\_CPU\_TARGET for a container deployed on AWS, and think I’m close to understanding it. These threads have helped: Understanding JULIA\_CPU\_TARGET Questions about JULIA\_CPU\_TARGET Arm64 ju…

---

## [Julia's Interaction with Foreign Threads](https://discourse.julialang.org/t/julias-interaction-with-foreign-threads/133888)

<div class="topic-metadata">

**Author:** [@Chrysoberyl](https://discourse.julialang.org/u/Chrysoberyl)\
**Replies:** 1\
**Last updated:** [November 20, 2025, 4:04am UTC](https://discourse.julialang.org/t/julias-interaction-with-foreign-threads/133888 "2025-11-20T04:04:28Z")

</div>

In my use case, I’m creating a Julia library for Julia code to interact with Rust code. It has 3 types of threads: Threads created by Julia, which can handle foreign objects via ForeignType Threads created by Rust, whi…

---

## [Compiler specialisation in automatic differentiation](https://discourse.julialang.org/t/compiler-specialisation-in-automatic-differentiation/129020)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 3\
**Last updated:** [May 19, 2025, 8:16am UTC](https://discourse.julialang.org/t/compiler-specialisation-in-automatic-differentiation/129020 "2025-05-19T08:16:46Z")

</div>

I am working with finite element method code. In this context, it is (very!!!) useful to use forward automatic differentiation to differentiate the function that, from degrees of freedom, compute the element’s contribut…

---

## [Uahgi - an experimential typesetting engine/compiler generating PDF document](https://discourse.julialang.org/t/uahgi-an-experimential-typesetting-engine-compiler-generating-pdf-document/125967)

<div class="topic-metadata">

**Author:** [@Yoxem](https://discourse.julialang.org/u/Yoxem)\
**Replies:** 8\
**Last updated:** [February 18, 2025, 10:51am UTC](https://discourse.julialang.org/t/uahgi-an-experimential-typesetting-engine-compiler-generating-pdf-document/125967 "2025-02-18T10:51:08Z")

</div>

Announcing uahgi, which is an experimental typesetting engine/compiler like “the little plainTeX” (but actually its functions are not as rich as plainTeX). It’s a practice of the Knuth-liang hyphenation algorithm and a …

---

## [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…

---

## [Juliac and PackageCompiler](https://discourse.julialang.org/t/juliac-and-packagecompiler/124683)

<div class="topic-metadata">

**Author:** [@wujinq](https://discourse.julialang.org/u/wujinq)\
**Replies:** 1\
**Last updated:** [January 13, 2025, 2:35pm UTC](https://discourse.julialang.org/t/juliac-and-packagecompiler/124683 "2025-01-13T14:35:50Z")

</div>

It seems that juliac is currently being developed to compile Julia code into binary, which does not impose the constraints in static compilation. I’m however curous about the relation between juliac and Package Compiler:…

---

## [PackageCompiler app failure with Flux on AArch64/no GPU](https://discourse.julialang.org/t/packagecompiler-app-failure-with-flux-on-aarch64-no-gpu/99618)

<div class="topic-metadata">

**Author:** [@cirobr](https://discourse.julialang.org/u/cirobr)\
**Replies:** 0\
**Last updated:** [May 30, 2023, 5:14pm UTC](https://discourse.julialang.org/t/packagecompiler-app-failure-with-flux-on-aarch64-no-gpu/99618 "2023-05-30T17:14:12Z")

</div>

Cheers, I am working on an app that should run on an AArch64 multi-core device, no GPU. To become familiar with PackageCompiler, I have initially compiled a simple println(“Hello Word!”). As the function belongs to core…

---

## [Tuple-based (immutable, ordered) Dictionary and nested REPLCompletion](https://discourse.julialang.org/t/tuple-based-immutable-ordered-dictionary-and-nested-replcompletion/121004)

<div class="topic-metadata">

**Author:** [@marquito](https://discourse.julialang.org/u/marquito)\
**Replies:** 2\
**Last updated:** [October 7, 2024, 3:48pm UTC](https://discourse.julialang.org/t/tuple-based-immutable-ordered-dictionary-and-nested-replcompletion/121004 "2024-10-07T15:48:51Z")

</div>

Hi! Since I couldn’t find a tuple-based (immutable and ordered) dictionary I came up with the following: struct TupleDict{K,V} \<: AbstractDict{K,V} ks::Tuple{Vararg{K}} vs::Tuple{Vararg{V}} function TupleDict{K,…

---

## [Compilers, purity, and variance computation](https://discourse.julialang.org/t/compilers-purity-and-variance-computation/119254)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 5\
**Last updated:** [September 10, 2024, 6:35pm UTC](https://discourse.julialang.org/t/compilers-purity-and-variance-computation/119254 "2024-09-10T18:35:13Z")

</div>

MOST likely you call sum, then std, i.e. separate loops and scan twice, BUT technically the functional approach doesn’t rule out optimal performance: scanning just once… In theory the compiler (of functional languages a…

---

## [Nice talk about Go PGO. What is the state in Julia?](https://discourse.julialang.org/t/nice-talk-about-go-pgo-what-is-the-state-in-julia/115715)

<div class="topic-metadata">

**Author:** [@Dan](https://discourse.julialang.org/u/Dan)\
**Replies:** 8\
**Last updated:** [June 24, 2024, 4:40pm UTC](https://discourse.julialang.org/t/nice-talk-about-go-pgo-what-is-the-state-in-julia/115715 "2024-06-24T16:40:48Z")

</div>

These devs get it! The first 10 minutes are about the Go ecosystem and are worth it for any language devs. The rest are a great introduction to optimization issues and PGO. P.S. What is the state of PGO in Julia? I wo…

---

## [Segmentation fault while trying to call a Julia function compiled to .so file from Python](https://discourse.julialang.org/t/segmentation-fault-while-trying-to-call-a-julia-function-compiled-to-so-file-from-python/113141)

<div class="topic-metadata">

**Author:** [@thecodingbugs](https://discourse.julialang.org/u/thecodingbugs)\
**Replies:** 19\
**Last updated:** [May 6, 2024, 9:36am UTC](https://discourse.julialang.org/t/segmentation-fault-while-trying-to-call-a-julia-function-compiled-to-so-file-from-python/113141 "2024-05-06T09:36:27Z")

</div>

Hello, I am using the examples from PackageCompiler.jl, specifically the MyLib one, and have issues with it. I have compiled MyLib using build.jl file given with it and have created .so files. Now I am trying to use the…

---

## [How to encourage compiler optimizations?](https://discourse.julialang.org/t/how-to-encourage-compiler-optimizations/113325)

<div class="topic-metadata">

**Author:** [@DanDoe](https://discourse.julialang.org/u/DanDoe)\
**Replies:** 12\
**Last updated:** [April 23, 2024, 1:32pm UTC](https://discourse.julialang.org/t/how-to-encourage-compiler-optimizations/113325 "2024-04-23T13:32:18Z")

</div>

I have two functions which contain an identical block of code foo followed by different blocks of code bar1, bar2. I time these functions using our timing tool which is essentially a derivate of \_timer\_expr from TimerOut…

---

## [Changes of A.jl are not understood from B.jl that includes A.jl](https://discourse.julialang.org/t/changes-of-a-jl-are-not-understood-from-b-jl-that-includes-a-jl/110498)

<div class="topic-metadata">

**Author:** [@DoctorDro](https://discourse.julialang.org/u/DoctorDro)\
**Replies:** 96\
**Last updated:** [March 9, 2024, 10:43pm UTC](https://discourse.julialang.org/t/changes-of-a-jl-are-not-understood-from-b-jl-that-includes-a-jl/110498 "2024-03-09T22:43:19Z")

</div>

Dear all, I am new, so many things could be different than Matlab or any other C,C++,Fortran language here. But I experienced a weird behaviour. My script B.jl starts by including a function found in another script A.jl…

---

## [Advanced Book Recommendation to Learn Julia](https://discourse.julialang.org/t/advanced-book-recommendation-to-learn-julia/100177)

<div class="topic-metadata">

**Author:** [@josemanuel22](https://discourse.julialang.org/u/josemanuel22)\
**Replies:** 5\
**Last updated:** [June 12, 2023, 12:08pm UTC](https://discourse.julialang.org/t/advanced-book-recommendation-to-learn-julia/100177 "2023-06-12T12:08:11Z")

</div>

I am looking for a technical book about Julia that, if possible, also explains all the intricacies of why Julia is designed the way it is, aspects of high performance, technical tricks, etc. I am a mathematician, but I h…

---

## [Create an executable from script](https://discourse.julialang.org/t/create-an-executable-from-script/99243)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 1\
**Last updated:** [May 22, 2023, 7:00pm UTC](https://discourse.julialang.org/t/create-an-executable-from-script/99243 "2023-05-22T19:00:16Z")

</div>

Googling here and there I managed to rename some .JPG files (produced, I believe, by an iphone) using the exif metadata. I have to give the script to a friend of mine who can’t install programs on his Windows PC. How c…

---

## [Why are spaces not allowed between function names and parentheses?](https://discourse.julialang.org/t/why-are-spaces-not-allowed-between-function-names-and-parentheses/96941)

<div class="topic-metadata">

**Author:** [@SeSodesa](https://discourse.julialang.org/u/SeSodesa)\
**Replies:** 1\
**Last updated:** [April 1, 2023, 11:11am UTC](https://discourse.julialang.org/t/why-are-spaces-not-allowed-between-function-names-and-parentheses/96941 "2023-04-01T11:11:52Z")

</div>

I’ve recently come to realize when using other languages, that I really like to write a space between a function name and the tuple that defines its input arguments, as in fn (x) = x instead of fn(x) = x This feels e…

---

## [Compiler optimizations for ComplexF64 vs Fortran](https://discourse.julialang.org/t/compiler-optimizations-for-complexf64-vs-fortran/96346)

<div class="topic-metadata">

**Author:** [@bremez](https://discourse.julialang.org/u/bremez)\
**Replies:** 7\
**Last updated:** [March 30, 2023, 6:23pm UTC](https://discourse.julialang.org/t/compiler-optimizations-for-complexf64-vs-fortran/96346 "2023-03-30T18:23:49Z")

</div>

My former colleague Michael Rutter now posted his comparison of Fortran compilers regarding their optimization of complex number arithmetic. I was wondering if anyone would like to see how Julia matches these? For examp…

---

## ["Optional" in-place output arguments](https://discourse.julialang.org/t/optional-in-place-output-arguments/82492)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 31\
**Last updated:** [June 13, 2022, 1:11pm UTC](https://discourse.julialang.org/t/optional-in-place-output-arguments/82492 "2022-06-13T13:11:22Z")

</div>

I am considering writing a function foo!(i1,i2,o1,o2,o3) where i1 etc. are inputs and o1 etc. are outputs. Importantly: all the outputs are preallocated (mutable) vectors, and the results are to written in place into…
