# Inlining functions

**URL:** <https://ziggit.dev/t/inlining-functions/1341>\
**Category:** Help\
**Tags:** language\
**Created:** [August 1, 2023, 1:35pm UTC](https://ziggit.dev/t/inlining-functions/1341 "2023-08-01T13:35:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![andrewrk](https://ziggit.dev/user_avatar/ziggit.dev/andrewrk/32/7011_2.png) [@andrewrk](https://ziggit.dev/u/andrewrk)\
**Post date:** [August 1, 2023, 5:03pm UTC](https://ziggit.dev/t/inlining-functions/1341/3 "2023-08-01T17:03:45Z")

</div>

It’s best to let the compiler decide when to inline a function, except for these scenarios:

- You want to change how many stack frames are in the call stack, for debugging purposes
- You want the comptime-ness of the arguments to propagate to the return value of the function
- Performance measurements _demand_ it. Don’t guess!

Otherwise you actually end up _restricting_ what the compiler is allowed to do when you use `inline` which can harm binary size, compilation speed, and even runtime performance.

---

_[View the full topic](https://ziggit.dev/t/inlining-functions/1341)._
