# PrecompileTools: precompilation causing allocations in Julia 1.6.7

**URL:** <https://discourse.julialang.org/t/precompiletools-precompilation-causing-allocations-in-julia-1-6-7/103039>\
**Category:** General Usage\
**Tags:** precompilation\
**Created:** [August 21, 2023, 4:18pm UTC](https://discourse.julialang.org/t/precompiletools-precompilation-causing-allocations-in-julia-1-6-7/103039 "2023-08-21T16:18:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Salmon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/salmon/32/22968_2.png) [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Post date:** [August 21, 2023, 4:36pm UTC](https://discourse.julialang.org/t/precompiletools-precompilation-causing-allocations-in-julia-1-6-7/103039/2 "2023-08-21T16:36:26Z")

</div>

Probably related to this:

> [@Removing precompilation leads to lower allocations!?](https://discourse.julialang.org/t/removing-precompilation-leads-to-lower-allocations/73621):
>
> In one of my packages I tried to lower import times, so I added a couple of typical usage examples in a “precompile” function. Something like function \_my\_precompile() # my "typical use case" code ... end function \_precompile\_() ccall(:jl\_generating\_output, Cint, ()) == 1 || return nothing \_my\_precompile() # precompile directives from SnoopCompile ... end \_precompile\_() However, in the presence of the \_my\_precompile, benchmarks of my code show thousands of allocations i…

I don’t know what the issue is but I think it got figured out and fixed for later Julia versions.  
(Of course it wasn’t precompile tools back then but maybe simply related to running code at precompile time)

---

_[View the full topic](https://discourse.julialang.org/t/precompiletools-precompilation-causing-allocations-in-julia-1-6-7/103039)._
