La Mancha
New Coder
Hello,
I have a program that is written in C and that is compiled with GCC on Linux, BSD and Solaris. I want the binary to run on all "x64" processors, so I use
The full result is attached to this post. The resulting runtime of the program, for each
(tested with GCC version 12.1.0 on Debian Linux)
How comes that, of all things, "nocona" produces faster code? That is some old "improved version of Intel Pentium 4 CPU", very different from my Zen3
Thank you!
I have a program that is written in C and that is compiled with GCC on Linux, BSD and Solaris. I want the binary to run on all "x64" processors, so I use
-march=x86_64
option. Also I was experimenting with different -mtune
options. My machine is AMD Ryzen 9 5950X, so I would think that -mtune=znver3
should produce the fastest code for my CPU. However, an exhaustive test of all available -mtune
values showed that there is hardly any difference between -mtune=generic
and any of the other values. For some reason, the only exception here is -mtune=nocona
, which clearly produces the fastest code!The full result is attached to this post. The resulting runtime of the program, for each
-mtune
value, is given in seconds. Lower (faster) is better.(tested with GCC version 12.1.0 on Debian Linux)
How comes that, of all things, "nocona" produces faster code? That is some old "improved version of Intel Pentium 4 CPU", very different from my Zen3
Thank you!
Attachments
Last edited: