What's new

Intel C++ compiler with AMD CPU's

mudlord

Banned
Hi there everyone :).

As some of you (or probably even most of you) know, I've been working on Hacktarux's Glide wrapper. Quite recently, I did some performance optimizations in regards to texture generation and deletion, and for some people, they make quite a speed difference and they seem also to be pretty rock solid and stable.

Because of this, I've decided to start releasing my WIP builds, recompiled with Intel's C/C++ compiler. I've previously been using Microsoft Visual C++ 6 SP5 with the Processor Pack, and judging from other people's reations, Intel's C++ compiler generates faster code (and Gonetz uses ICC for his builds).

Essentially, I am wondering IF there is a way to optimize code generation, using ICC, for AMD CPU's, and which compiler settings, parameters or anything else that is needed to make sure that Intel's compiler offers the same benefits to AMD CPU's as it currently does to Intel ones. Because, judging from the reports I have read, about the compiler set, AMD CPUs can be disadvantaged, in that there can be stability and performance problems, from optimizations used for Intel CPU's.

Thank you all for your time.

EDIT: I am currently using version 9.0 of the Intel compiler set (not 9.1)
 
Last edited:
F

fbff

Guest
What I've heard is that the compiler adds code into your executable which detects the processor type. If it detects a AMD chip, it will disable those optimisations inside your executable. I've heard that some people have then gone into the executable and removed the check, which results in the speed increase for both AMD and Intel chips.

Ok, all of this is based off what I have heard. I have not had first hand experience with changing the compiled exe. It is also pretty old info like ICC v7 days.

I guess google could help. Let us know how you go.
 

Cyberman

Moderator
Moderator
I would look at AMD's website and talk to there support people as well.

For developers.
As for using the Intel compilor, that's a tough one, if you can get the compilor to output assembly for the sections of code you are optimizing (you aren't char blanq using optimizations are you?), you should be able to make a PERL or python script to sift through the generated code and yank out the processor detection code. This will add a bit of speed up as well.

Cyb
 
OP
mudlord

mudlord

Banned
fbff:

Thanks for the information, I looked all through Google to find a set of compiler declarations and settings to enable the AMD workaround, but ouldnt find any. Oh well.

Cyberman:

Thanks for the link, I will have a chat to the AMD guys to see if they know the trick for this. I'm currently using global compiler flags to set the optimizations, but that section-specific sounds pretty cool. Currently the sections in the wrapper I beleive need to be optimized are:

* The graphics filter code (2xSai/HQ2X/HQ4X).
* The texture mipmap code
* The software framebuffer code (the code is very slow as is [due to glReadPixels], and I beleive there's no real way to code more efficent code for it. But maybe the Intel compiler might help a little bit)


I'll see about trying your ideas, and see how it goes. I'll also try to contact Gonetz to see how he does it, too.

EDIT: From recently discovered information, it seems that there's no need for custom compiler settings to be used when compiling the wrapper, as there is no problems when using the settings that the compiler pre-allocates. Thanks to everyone for thier advice, though :) This topic can be locked now.
 
Last edited:

Top