# Per-function optimization?

**URL:** <https://ziggit.dev/t/per-function-optimization/5455>\
**Category:** Help\
**Tags:** build-system\
**Created:** [August 1, 2024, 1:39pm UTC](https://ziggit.dev/t/per-function-optimization/5455 "2024-08-01T13:39:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssilnicki-dev](https://ziggit.dev/user_avatar/ziggit.dev/ssilnicki-dev/32/2151_2.png) [@ssilnicki-dev](https://ziggit.dev/u/ssilnicki-dev)\
**Post date:** [August 1, 2024, 1:39pm UTC](https://ziggit.dev/t/per-function-optimization/5455/1 "2024-08-01T13:39:34Z")

</div>

Hello! is it possible somehow to switch compiler optimization for particular function?

---

<div class="post-metadata">

**Author:** ![LucasSantos91](https://ziggit.dev/user_avatar/ziggit.dev/lucassantos91/32/440_2.png) [@LucasSantos91](https://ziggit.dev/u/LucasSantos91)\
**Post date:** [August 1, 2024, 2:16pm UTC](https://ziggit.dev/t/per-function-optimization/5455/2 "2024-08-01T14:16:02Z")

</div>

Only a few things can be switched at such granularity, like runtime safety, floating point mode and the hotness / coldness of a certain part of the code. These can be switched with the corresponding builtins.  
If you need more granularity than this, you can move your functions to another module. Each module can have its own settings, including optimization level.
