# Why does julia use thousands of cpu-hours to compute 1+2?

**URL:** <https://discourse.julialang.org/t/why-does-julia-use-thousands-of-cpu-hours-to-compute-1-2/66041>\
**Category:** General Usage\
**Tags:** hpc, distributed\
**Created:** [August 8, 2021, 8:17pm UTC](https://discourse.julialang.org/t/why-does-julia-use-thousands-of-cpu-hours-to-compute-1-2/66041 "2021-08-08T20:17:54Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![moble](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/moble/32/23535_2.png) [@moble](https://discourse.julialang.org/u/moble)\
**Post date:** [August 14, 2021, 4:43am UTC](https://discourse.julialang.org/t/why-does-julia-use-thousands-of-cpu-hours-to-compute-1-2/66041/3 "2021-08-14T04:43:13Z")

</div>

I’ve hacked together a precompilation script [here](https://gist.github.com/moble/709b25556ca229e9e340c6249e68010f), which produces a sysimage with all the necessary `Distributed` code precompiled. This drastically reduces the time taken to call `@everywhere 1+2`. I’ve tested it on 100 processes, and the time goes down from ~70 seconds to ~2 seconds. If this scales up to thousands of processes, it’s definitely something I can handle.

---

_[View the full topic](https://discourse.julialang.org/t/why-does-julia-use-thousands-of-cpu-hours-to-compute-1-2/66041)._
