- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I've found that some codes compiled by the Intel compiler are significantly slower than those by GCC.
Here is a sample code.
https://github.com/kaityo256/compiler_test
This is a Monte Carlo simulation code of the Potts model which is one of the fundamental models in statistical physics.
Here is a benchmark result.
* Compile Options
g++ -O3 -march=native -Wall -Wextra -std=c++11 main.cpp -o gcc.out
icpc -O3 -xHOST -Wall -Wextra -std=c++11 main.cpp -o icpc.out
* Environment
CPU: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10GHz
OS: CentOS Linux release 7.6.1810 (Core)
GCC: g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
icpc: icpc (ICC) 19.0.4.243 20190416
$ ./gcc.out
Magnetization : 0.891599
Elapsed : 305 [ms]
$ ./icpc.out
Magnetization : 0.891599
Elapsed : 880 [ms]
The two executables give the identical result, but the executable produced by Intel compiler is significantly slower than that by GCC.
I want to figure out what is happening here and write an article (maybe in Japanese). But I am afraid that the detailed analysis of optimization can be regarded as "reverse engineering" which is inhibited in EULA, since the investigation may reveal the limitations of optimization capabilities of the Intel compiler.
I am going to compare assembly codes produced by GCC and the Intel compiler, but I will not decompile the Intel compiler.
Does the above attempt violate EULA?
Thanks in advance.
- Tags:
- CC++
- Development Tools
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you can generate the assembly file and compare with other compiler's generated code.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you can generate the assembly file and compare with other compiler's generated code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much!
I will write a report somewhere.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page