# Verify that function has been compiled?

**URL:** <https://discourse.julialang.org/t/verify-that-function-has-been-compiled/49885>\
**Category:** Internals & Design\
**Created:** [November 10, 2020, 6:08am UTC](https://discourse.julialang.org/t/verify-that-function-has-been-compiled/49885 "2020-11-10T06:08:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Pevny](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomas_pevny/32/25466_2.png) [@Tomas\_Pevny](https://discourse.julialang.org/u/Tomas_Pevny)\
**Post date:** [November 10, 2020, 6:08am UTC](https://discourse.julialang.org/t/verify-that-function-has-been-compiled/49885/1 "2020-11-10T06:08:15Z")

</div>

Hi all,

In order to decrease a GC pressure during training of machine learning models, we override the default julia allocator for arrays, such that these arrays are created inside the pre- allocated buffer, which is scrapped after each iteration. It seems to work for us rather good, but I am afraid this solution to be a bit fragile. For example I do not know, how this might interfere with Julia compiler, if I by accident hit a function which needs to be compiled ( our data are not tensors and they can come in many types due to missing values). I would like to therefore ask, if there is a some way to verify, that Julia has already seen this function with such combination of arguments.

Thanks for the answer,  
Tomas

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [November 11, 2020, 12:30pm UTC](https://discourse.julialang.org/t/verify-that-function-has-been-compiled/49885/2 "2020-11-11T12:30:58Z")

</div>

MethodAnalysis allows you to ask these kinds of questions. You can search for `MethodInstance`s (which are the result of running type-inference) or `CodeInstance`s (which are the result of complete compilation).

[https://github.com/timholy/MethodAnalysis.jl](https://github.com/timholy/MethodAnalysis.jl)
