# No allocs after restart

**URL:** <https://discourse.julialang.org/t/no-allocs-after-restart/117273>\
**Category:** New to Julia\
**Created:** [July 20, 2024, 1:34pm UTC](https://discourse.julialang.org/t/no-allocs-after-restart/117273 "2024-07-20T13:34:56Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [July 21, 2024, 12:21pm UTC](https://discourse.julialang.org/t/no-allocs-after-restart/117273/11 "2024-07-21T12:21:27Z")

</div>

This vaguely reminds me of the following.

> [@Elimination of (unnecessary) runtime dispatch allocations](https://discourse.julialang.org/t/elimination-of-unnecessary-runtime-dispatch-allocations/113475):
>
> Avoiding runtime dispatch is perhaps the #1 optimization advice in Julia forums. As I understand it, the reason is that when the Julia compiler does a runtime dispatch it does not at compile-time neccesarily know the return type of the function to be called. And so, it needs to allocate space for the return value on the heap (“box’ed”). Hence, common advice is to avoid runtime dispatch. However, this is not always possible - probably the most frequent example is when processing a vector of het…

Another possibility is there is a bug in `@time` if that is the sole way you are checking allocations.

Have you tried AllocCheck.jl?

---

_[View the full topic](https://discourse.julialang.org/t/no-allocs-after-restart/117273)._
