# Achieving OpenBLAS DGEMM performance with Fortran vs C intrinsics: why is Fortran slower?

**URL:** https://fortran-lang.discourse.group/t/achieving-openblas-dgemm-performance-with-fortran-vs-c-intrinsics-why-is-fortran-slower/10355
**Category:** Help
**Created:** [August 22, 2025, 11:18am UTC](https://fortran-lang.discourse.group/t/achieving-openblas-dgemm-performance-with-fortran-vs-c-intrinsics-why-is-fortran-slower/10355 "2025-08-22T11:18:12Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)
#### Post date: [August 22, 2025, 2:03pm UTC](https://fortran-lang.discourse.group/t/achieving-openblas-dgemm-performance-with-fortran-vs-c-intrinsics-why-is-fortran-slower/10355/6 "2025-08-22T14:03:23Z")

</div>

> [@Said-H](#):
>
> I have updated the Fortran file to contain the Pure Fortran implementation.

Perhaps using `!$omp simd` could provide some extra control? (It might just by a rabbit-hole which doesn’t end.) It depends if you count that as pure Fortran anymore; at least Intel Fortran and gfortran have the `-qopenmp-simd`/`-fopenmp-simd` flags, which don’t need linking with the OpenMP runtime. Maybe also the new loop transformation constructs `!$omp tile` and `!$omp unroll` could help, although YMMV due to implementation differences among compilers, not to mention interaction with the optimization passes.

A similar challenge was discussed in the thread: [C++ Standard Library dense linear algebra interface - #22 by tyranids](https://fortran-lang.discourse.group/t/c-standard-library-dense-linear-algebra-interface/6286/22) (see posts from @tyranids)

---

_[View the full topic](https://fortran-lang.discourse.group/t/achieving-openblas-dgemm-performance-with-fortran-vs-c-intrinsics-why-is-fortran-slower/10355)._
