# Julia precompile

**URL:** <https://discourse.julialang.org/t/julia-precompile/34282>\
**Category:** New to Julia\
**Tags:** question, package, precompilation\
**Created:** [February 7, 2020, 3:27am UTC](https://discourse.julialang.org/t/julia-precompile/34282 "2020-02-07T03:27:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![raqkaaq](https://avatars.discourse-cdn.com/v4/letter/r/50afbb/32.png) [@raqkaaq](https://discourse.julialang.org/u/raqkaaq)\
**Post date:** [February 7, 2020, 3:27am UTC](https://discourse.julialang.org/t/julia-precompile/34282/1 "2020-02-07T03:27:31Z")

</div>

I am completely new to julia, and I would like to learn how to optimize my code to run as fast as possible. I don’t know if this has already been answered or not, but I created a .julia/config/startup.jl file with the line  
@time using DifferentialEquations, Plots;  
so that everytime I open the repl I can just use the package functions. Everytime I open the repl it takes 30 seconds to load. Is there a way to use a precompiled version to make it faster?

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [February 7, 2020, 5:52am UTC](https://discourse.julialang.org/t/julia-precompile/34282/2 "2020-02-07T05:52:25Z")

</div>

Check out:

> **[GitHub - JuliaLang/PackageCompilerX.jl](https://github.com/JuliaLang/PackageCompilerX.jl)**
>
> Contribute to JuliaLang/PackageCompilerX.jl development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Orbots](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/orbots/32/3392_2.png) [@Orbots](https://discourse.julialang.org/u/Orbots)\
**Post date:** [February 7, 2020, 7:42pm UTC](https://discourse.julialang.org/t/julia-precompile/34282/3 "2020-02-07T19:42:11Z")

</div>

How does this relate to [https://github.com/JuliaLang/PackageCompiler.jl](https://github.com/JuliaLang/PackageCompiler.jl)?

What is my best option if I’m interested in distributable shared libaries? ( .dll/.so )

---

<div class="post-metadata">

**Author:** ![jlapeyre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlapeyre/32/4514_2.png) [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Post date:** [May 29, 2020, 10:11pm UTC](https://discourse.julialang.org/t/julia-precompile/34282/4 "2020-05-29T22:11:32Z")

</div>

Please excuse the necropost, but this question didn’t get an answer and I want to set the record straight (although someone more knowledgeable might supply details) in this thread

> [@Orbots](#):
>
> How does this relate to [https://github.com/JuliaLang/PackageCompiler.jl](https://github.com/JuliaLang/PackageCompiler.jl)

You should use [GitHub - JuliaLang/PackageCompiler.jl: Compile your Julia Package](https://github.com/JuliaLang/PackageCompiler.jl) .

The version with “X” appended is an obsolete developement version.

> [@Orbots](#):
>
> What is my best option if I’m interested in distributable shared libaries? ( .dll/.so )

The closest you can get is also `PackageCompiler.jl`.

See also: [What's actually inside precompiled Julia files?](https://discourse.julialang.org/t/whats-actually-inside-precompiled-julia-files/28234)

---

<div class="post-metadata">

**Author:** ![Orbots](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/orbots/32/3392_2.png) [@Orbots](https://discourse.julialang.org/u/Orbots)\
**Post date:** [May 29, 2020, 11:24pm UTC](https://discourse.julialang.org/t/julia-precompile/34282/5 "2020-05-29T23:24:58Z")

</div>

No worries. Always happy to have an answer. I have some issues at julia github that are going on a year old, would be happy for some necro-updates to that 🙂

The old PackageCompiler.jl used to support building shared library files with c exported functions of my choice. This new direction seems very focused on the time-to-first-plot problem and not too concerned with my use case. I had trouble getting it to export my own `Base.@ccallable function` which wasn’t a problem with the older one.

I’ll raise issues there if I can’t tweak it to produce what I want.

Thanks.
