# Compile-time unit checking in Fortran: some practical experiences

**URL:** <https://fortran-lang.discourse.group/t/compile-time-unit-checking-in-fortran-some-practical-experiences/8488>\
**Category:** Uncategorized\
**Created:** [August 18, 2024, 12:18am UTC](https://fortran-lang.discourse.group/t/compile-time-unit-checking-in-fortran-some-practical-experiences/8488 "2024-08-18T00:18:07Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![wspector](https://avatars.discourse-cdn.com/v4/letter/w/47e85d/32.png) [@wspector](https://fortran-lang.discourse.group/u/wspector)\
**Post date:** [August 18, 2024, 7:38pm UTC](https://fortran-lang.discourse.group/t/compile-time-unit-checking-in-fortran-some-practical-experiences/8488/4 "2024-08-18T19:38:21Z")

</div>

> [@btrettel](#):
>
> … Something about writing units as derived types inherently causes a slow down. I’m not a compiler engineer, so I don’t know what’s going on under the hood…

Have you tried profiling the test code yet? It would be interesting to know where the ‘hot spots’ are. Might be something relatively simple to fix.

I suspect you are generating a lot of procedure calls within hot loops. Perhaps turning on compiler inlining might help.

---

_[View the full topic](https://fortran-lang.discourse.group/t/compile-time-unit-checking-in-fortran-some-practical-experiences/8488)._
