# Help reducing compilation and inference time

**URL:** <https://discourse.julialang.org/t/help-reducing-compilation-and-inference-time/116630>\
**Category:** Performance\
**Tags:** compilation, latency\
**Created:** [July 4, 2024, 2:32pm UTC](https://discourse.julialang.org/t/help-reducing-compilation-and-inference-time/116630 "2024-07-04T14:32:51Z")\
**Posts on this page:** 1\
**Showing post:** 65

<div class="post-metadata">

**Author:** ![osimonn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/osimonn/32/44888_2.png) [@osimonn](https://discourse.julialang.org/u/osimonn)\
**Post date:** [July 7, 2024, 12:58pm UTC](https://discourse.julialang.org/t/help-reducing-compilation-and-inference-time/116630/65 "2024-07-07T12:58:39Z")

</div>

> [@ToucheSir](#):
>
> Have you checked if TTFX is faster?

Yes. Here are some crude results.  
Without an opt flag: 4m4.478s  
With `-O0`: 1m34.976s

> [@ToucheSir](#):
>
> it’s worth looking into which functions are giving LLVM a hard time

That’s precisely what I want to achieve but I don’t know how or where to start from.

> [@ToucheSir](#):
>
> not `@inline`ing every function

We use `@inline` in our code but not extensively. Additionally, we usually use the macro for small functions. I will remove the inline macros and see if it will make a difference but I have my doubts.

> [@ToucheSir](#):
>
> avoiding large tuples

We do have a lot of large tuples and nested tuples because we are interfacing with C code. However, I thought this issue was fixed in Julia 1.9. I posted about this issue a couple of years ago [here](https://discourse.julialang.org/t/reduce-compilation-time-for-long-and-nested-tuples/91392). Julia 1.9 did indeed reduce our compilation time significantly but the compilation time still remains high as you can tell by the aforementioned reported times at the beginning of this reply.

---

_[View the full topic](https://discourse.julialang.org/t/help-reducing-compilation-and-inference-time/116630)._
