# Compilation time vs. C++

**URL:** <https://fortran-lang.discourse.group/t/compilation-time-vs-c/2430>\
**Category:** Help\
**Created:** [December 21, 2021, 12:35am UTC](https://fortran-lang.discourse.group/t/compilation-time-vs-c/2430 "2021-12-21T00:35:44Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![certik](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/certik/32/4_2.png) [@certik](https://fortran-lang.discourse.group/u/certik)\
**Post date:** [December 21, 2021, 7:28pm UTC](https://fortran-lang.discourse.group/t/compilation-time-vs-c/2430/7 "2021-12-21T19:28:19Z")

</div>

> [@everythingfunctional](#):
>
> I have made this exact point multiple times. Unnecessary compilation cascades are a failure of the build systems and compilers, not the language itself.

In fact gfortran + cmake already fix this. You can try it yourself, just add a print statement to some function in a module, and dependent modules will _not_ be recompiled. So this is fixed in practice.

> [@plevold](#):
>
> I think the amount of template code used in a C++ project will drive compilation times up.

Yes, the compilation speed of C++ depends on how many templates you use, as well as how many header files you include with templates and compile time computation.

---

_[View the full topic](https://fortran-lang.discourse.group/t/compilation-time-vs-c/2430)._
