I agree that opening a case is the best course of action at this point. The general approach here would be to compile sequentially first (i.e. "make -j 1") and add the "time" command before ibm-clang++_r and xlC. Then pick up the file that has the longest compile time (and biggest difference between Open XL and XL). Then for that file, turn on timing reports which will tell us how much time the compiler is spending in each stage. That will help know where the bottleneck is.
For example, "-ftime-report=per-pass-run" will give a general report to stdout for the file you're compiling. Another option is "-ftime-trace" which will output the timing information to a json file instead of stdout. The support team can then look at where we're spending the time and go from there.
In general, Open XL has better compile-time performance than XL, especially at higher optimization levels. XL used to slow down significantly once you turned on -qipa or -O4.
Original Message:
Sent: Thu April 24, 2025 10:10 AM
From: Emanuel Reisinger
Subject: Weak performance of Open XL C/C++ 17 for AIX
Hi Andrey,
Thank you for your ideas and suggestions. But it's not a single file or a few files which takes longer. I assume that each single compiler task that takes more time.
I've to take a video to show this behavior. Then you can see that each creation of a dependency file or compilation of source file takes more time with v17. v13 compiler is much more faster than v17. I think it's not useful to post plenty lines of compiler output because each line is mainly reoccurring the same information. Timestamp does only approve my statements.
I will open a case at IBM.
Thank you.
------------------------------
Emanuel Reisinger
Original Message:
Sent: Thu April 24, 2025 09:05 AM
From: Andrey Klyachkin
Subject: Weak performance of Open XL C/C++ 17 for AIX
Emanuel,
big numbers help to understand that there is a performance impact. But after you understand that there is a performance impact, you should go down to understand if you have this big impact because of one single file, that compiles longer (yes, there was such bug in some Open XL C/C++ version), or each of your files compiles longer and this is the reason why the whole compilation process takes so long.
If you don't trust posting it on the forum, you must open a case at IBM support, and they should help you. I see that your build time takes longer. I assume that the only difference between the two build processes is the compiler. No, I didn't compare performance between V13 and V17.1.2. No, I didn't notice any radical performance differences between V16 and V17.
But, for example, I didn't have the bug with the slow compilation I mentioned before. One of my colleagues occasionally got it. Similar to you, he got very long build times, and after we looked more precisely at the build process, we found that some specific files take more time to build. He opened a case at IBM and got a fix for the problem.
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Thu April 24, 2025 08:19 AM
From: Emanuel Reisinger
Subject: Weak performance of Open XL C/C++ 17 for AIX
test case: see post before. A single test case is difficult to create. Because with one compilation unit you will not measure the performance losses.
pines & apples: I will update both compilers with the latest fix packs, test it again and will come back with the new insights.
different technologies: Yes, they are different technologies but a newer technology should not be slower per default. Not in this dimension. At the moment I have no test environment on Linux.
Project dimension:
- +700 dependency files to create from scratch. So we have +700 source files (without header files)
- organized in libraries/archives to build faster (not everything at once) single binaries during development
- 100 productive binaries to build
- +140 unittest binaries to build
There is not one big compilation unit that takes so long. It's the whole project. When the 700 dependency files are created you can see the performance impact. v13 is much more faster than v17.
Our nightly build builds 4-6 releases from this project and automatically executes unittests and other tests.
v13 requires 3h30min for 5 releases + unittests + other tests. (26min to build 1 release)
v17 requires 3h45min for 2 releases + unittests (without other tests) (nearly 2h for 1 release)
So v17 takes 4 times more time.
------------------------------
Emanuel Reisinger
Original Message:
Sent: Thu April 24, 2025 04:21 AM
From: Andrey Klyachkin
Subject: Weak performance of Open XL C/C++ 17 for AIX
Hi Emanuel,
I am missing a test case in your post. Of course, it can be that Open XL C works slower, but to understand why and to answer your question, I need a test case.
Basically, as far as I see, you compare pines with apples. You have an old XL C/C++ compiler, V13.1.3. As far as I can see, there are no fixes installed. The Open XL C/C++ compiler you use is also outdated and without any fixes. The latest version is 17.1.3.2. Check it here-https://www.ibm.com/support/pages/fix-list-xl-cc-aix-if you need any fixes. As you see on the site, there were 15 fix packs for 17.1.2.
As Rafik already pointed out, the compilers have different technologies. IBM "Classic" XL C/C++ has IBM's proprietary technology but doesn't support modern standards. IBM Open XL C/C++ is Clang-based. Can your project be compiled on Linux with open-source LLVM clang? Can you measure whether it works better or worse there? Can you compile your project with "Classic" XL C/C++ V16 on AIX and see how long it takes?
If your project requires 10 minutes to compile, I think it consists of many files. Is there any file that takes longer to compile? Or does each file take three times more time?
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Wed April 23, 2025 09:55 AM
From: Emanuel Reisinger
Subject: Weak performance of Open XL C/C++ 17 for AIX
Hello,
We are testing the new Version of IBM Open XL C/C++ for AIX 17.1.2 and encounter a very weak performance in comparison with IBM XL C/C++ for AIX, V13.1.3 on the same hardware when we are compiling our software.
# oslevel -s
7200-05-08-2420
# ibm-clang++_r --version
IBM Open XL C/C++ for AIX 17.1.2 (5725-C72, 5765-J18), version 17.1.2.0, clang version 17.0.2 (build c52f58d)
Target: powerpc-ibm-aix7.2.0.0
Thread model: posix
InstalledDir: /opt/IBM/openxlC/17.1.2/bin
# xlC_r -qversion
IBM XL C/C++ for AIX, V13.1.3 (5725-C72, 5765-J07)
Version: 13.01.0003.0000
With V13 the compilation takes 185 seconds and with V17 it takes 595 seconds.
Why is the Open XL C++ so worse in performance?
------------------------------
Emanuel Reisinger
------------------------------
#C/C++andFortran