# Precompile a script?

**URL:** <https://discourse.julialang.org/t/precompile-a-script/5364>\
**Category:** General Usage\
**Tags:** question\
**Created:** [August 13, 2017, 9:29pm UTC](https://discourse.julialang.org/t/precompile-a-script/5364 "2017-08-13T21:29:49Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [May 20, 2020, 4:51pm UTC](https://discourse.julialang.org/t/precompile-a-script/5364/14 "2020-05-20T16:51:43Z")

</div>

> [@zachmatson](#):
>
> Julia is just at the point right now where it makes more sense not to use one for short scripts

I think it does make sense, just try `julia -O0` if it’s very short running.

> [@Rethinking optimization, lower ok for all Julia code (for e.g. faster startup) as a default?](https://discourse.julialang.org/t/rethinking-optimization-lower-ok-for-all-julia-code-for-e-g-faster-startup-as-a-default/39843):
>
> Clearly lower optimization wouldn’t be faster always, or we would always use lower levels. As of version 1.5 it doesn’t need to be one global setting, and since we can tune I suggest changing the default. E.g. for some real-world 27 line script of mine (that uses three packages, e.g. CSV.jl) runs for 20 sec. (17 sec. on julia-1.6-dev) on Julia’s defaults that are 45% slower, and I’ve gotten 3.7x the speed, with non-default, lowest (lower than -O0 only; with --compile=min additionally), optimizat…

An interpreter can also in practice (for short-running code) be faster, and I haven’t looked enough at [Home · JuliaInterpreter.jl](https://juliadebug.github.io/JuliaInterpreter.jl/stable/) it may be for other purposes (only for debug?).

---

_[View the full topic](https://discourse.julialang.org/t/precompile-a-script/5364)._
