Intel's ifx significantly slower at compiling data heavy subroutine

For a data heavy subroutine, ifx takes noticeably longer than gfortran to compile.

Compiler versions

$ ifx --version
ifx (IFX) 2025.3.2 20260112
Copyright (C) 1985-2026 Intel Corporation. All rights reserved.

$ gfortran --version
GNU Fortran (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gfortran-14 --version
GNU Fortran (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compilation times

$ time ifx mwe.f90 -o mwe-ifx
ifx mwe.f90 -o mwe-ifx  44.25s user 0.26s system 99% cpu 44.609 total

$ time gfortran mwe.f90 -o mwe-gfortran
gfortran mwe.f90 -o mwe-gfortran  0.17s user 0.06s system 83% cpu 0.279 total

$ time gfortran-14 mwe.f90 -o mwe-gfortran-14
gfortran-14 mwe.f90 -o mwe-gfortran-14  0.17s user 0.06s system 87% cpu 0.265 total

Runtime behavior

$ time ./mwe-ifx > ifx-output
./mwe-ifx > ifx-output  0.00s user 0.00s system 76% cpu 0.011 total

$ time ./mwe-gfortran > gfortran-output
./mwe-gfortran > gfortran-output  0.01s user 0.00s system 95% cpu 0.010 total

$ time ./mwe-gfortran-14 > gfortran-14-output
./mwe-gfortran-14 > gfortran-14-output  0.01s user 0.00s system 93% cpu 0.011 total

$ diff3 gfortran-14-output gfortran-output ifx-output

$ ls -l
total 1344
-rw-rw-r-- 1 user group 100200 Feb  1 17:22 gfortran-14-output
-rw-rw-r-- 1 user group 100200 Feb  1 17:22 gfortran-output
-rw-rw-r-- 1 user group 100200 Feb  1 17:22 ifx-output
-rw-rw-r-- 1 user group 114183 Feb  1 16:42 mwe.f90
-rwxrwxr-x 1 user group 113064 Feb  1 17:22 mwe-gfortran
-rwxrwxr-x 1 user group 113064 Feb  1 17:22 mwe-gfortran-14
-rwxrwxr-x 1 user group 721888 Feb  1 17:21 mwe-ifx

The source code for the program is at slow-compile-mwe.f90 - Pastes.io (the pastebin expires in 1 month, may edit the question to put the source code here once there’s enough reputation)

3 Likes
3 Likes