# Re-using compiled code

**URL:** <https://discourse.julialang.org/t/re-using-compiled-code/93524>\
**Category:** General Usage\
**Tags:** compilation, precompilation, latency\
**Created:** [January 25, 2023, 6:06pm UTC](https://discourse.julialang.org/t/re-using-compiled-code/93524 "2023-01-25T18:06:04Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![ToucheSir](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/touchesir/32/14411_2.png) [@ToucheSir](https://discourse.julialang.org/u/ToucheSir)\
**Post date:** [January 28, 2023, 8:07pm UTC](https://discourse.julialang.org/t/re-using-compiled-code/93524/21 "2023-01-28T20:07:50Z")

</div>

Historically there has been [resistance](https://github.com/JuliaStats/Distances.jl/issues/172) to taking on ChainRulesCore as a dep. I’d assume this is no longer a problem with package extensions, but I can’t speak for the maintainers.

---

<div class="post-metadata">

**Author:** ![simsurace](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simsurace/32/30216_2.png) [@simsurace](https://discourse.julialang.org/u/simsurace)\
**Post date:** [January 30, 2023, 12:26pm UTC](https://discourse.julialang.org/t/re-using-compiled-code/93524/22 "2023-01-30T12:26:44Z")

</div>

Ok, after reading up on this a bit I think I now understand the issues a bit better. Actually it was kind of expected to run into this kind of problem. It seems that package extensions were in part introduced to make it possible to avoid this, but the ecosystem hasn’t yet fully caught up with this.

So if the adjoints were moved to Distances.jl as a package extension, would that be backwards compatible with Julia \<v1.9?

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [January 30, 2023, 12:56pm UTC](https://discourse.julialang.org/t/re-using-compiled-code/93524/23 "2023-01-30T12:56:03Z")

</div>

there are 3 different ways you can make it backwards compatible depending on which 1.9 behavior you want.

---

<div class="post-metadata">

**Author:** ![simsurace](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simsurace/32/30216_2.png) [@simsurace](https://discourse.julialang.org/u/simsurace)\
**Post date:** [January 30, 2023, 2:05pm UTC](https://discourse.julialang.org/t/re-using-compiled-code/93524/24 "2023-01-30T14:05:19Z")

</div>

I opened [an issue](https://github.com/FluxML/Zygote.jl/issues/1365) in Zygote.jl.

[Previous page](https://discourse.julialang.org/t/re-using-compiled-code/93524.md?page=1)
