# Can Julia really be used as a scripting language? (Performance)

**URL:** <https://discourse.julialang.org/t/can-julia-really-be-used-as-a-scripting-language-performance/40384>\
**Category:** Performance\
**Created:** [May 29, 2020, 1:06am UTC](https://discourse.julialang.org/t/can-julia-really-be-used-as-a-scripting-language-performance/40384 "2020-05-29T01:06:51Z")\
**Posts on this page:** 1\
**Showing post:** 66

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [June 3, 2020, 5:25pm UTC](https://discourse.julialang.org/t/can-julia-really-be-used-as-a-scripting-language-performance/40384/66 "2020-06-03T17:25:11Z")

</div>

> [@dlakelan](#):
>
> For this usage, it seems reasonable to ship a julia system image that includes those packages using PackageCompiler… at that point. I would HOPE that the startup time would be less than 1s before the julia code started executing the queries against the database and soforth… so that if the graph generation time was 3 seconds, there would be no 30 second recompile times involved every time you invoke the script. Is that correct?

Yes, that’s precisely what PackageCompiler will do. Even better, it can give you a relocatable bundle that includes all artifacts and dependencies and Julia itself with a single point of entry.

Were I putting together something to ship, I’d do it as a package. Note that packages have [facilities](https://timholy.github.io/SnoopCompile.jl/stable/) to do even more precompilation than the default. If I _really_ needed to cut down on startup time, I’d use PackageCompiler. Both of those are great as they will automatically install/bundle dependencies.

If you really want to stick to a script paradigm, you could look into using `@nospecialize` or `Base.Experimental.@optlevel 0` (on 1.5) to do more finely tuned versions of `--compile=min` and `-O0` that get included as a part of your script.

I should emphasize that _lots_ of work has gone into improving this latency on 1.5 and it’s continuing to improve.

---

_[View the full topic](https://discourse.julialang.org/t/can-julia-really-be-used-as-a-scripting-language-performance/40384)._
