# Overhead between calling a function and running the first line its code

**URL:** <https://discourse.julialang.org/t/overhead-between-calling-a-function-and-running-the-first-line-its-code/93963>\
**Category:** General Usage\
**Created:** [February 2, 2023, 11:57pm UTC](https://discourse.julialang.org/t/overhead-between-calling-a-function-and-running-the-first-line-its-code/93963 "2023-02-02T23:57:30Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [February 4, 2023, 7:35pm UTC](https://discourse.julialang.org/t/overhead-between-calling-a-function-and-running-the-first-line-its-code/93963/8 "2023-02-04T19:35:57Z")

</div>

> [@mkitti](#):
>
> I do wonder now that we have pkgimgs how long would it take to get scriptimgs .

> [@Taking advantage of pkgimages in 'scripts'](https://discourse.julialang.org/t/taking-advantage-of-pkgimages-in-scripts/93535):
>
> There’s a lot of benchmark scripts out there right now where Julia is at a big disadvantage due to compiler overhead and such. Has anyone thought out an easy way that we can start taking advantage of pkgimages to reduce this compilation overhead in various benchmarks? Having to bundle all of the user’s code into a dev’d package seems a little heavy. E.g. in the example of [n-body Julia&nbsp;#8 program (Benchmarks Game)](https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/nbody-julia-8.html) could we make this significantly faster by bundling the code into a pkgimage, and …

---

_[View the full topic](https://discourse.julialang.org/t/overhead-between-calling-a-function-and-running-the-first-line-its-code/93963)._
