SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Technology Stocks : Advanced Micro Devices - Moderated (AMD) -- Ignore unavailable to you. Want to Upgrade?


To: Scott D. who wrote (20901)11/28/2000 8:51:53 PM
From: fyodor_Read Replies (1) | Respond to of 275872
 
Scott: For example, a common problem with global pointers is that they often prevent the compiler from being able to prove two memory references are distinct locations. Consequently, this prevents certain reordering transformations.

If you are using globals you should be shot, anyway.

(Well, at least if my understanding is correct.. *cough*... that globals are not (never?) stored in the registers... or something... I don't recall exactly :/... globals are bad for stuff like that! ;))

-fyo



To: Scott D. who wrote (20901)11/29/2000 3:07:07 PM
From: Steve PorterRead Replies (1) | Respond to of 275872
 
Scott:

<For example, a common problem with global pointers is that they often
prevent the compiler from being able to prove two memory references
are distinct locations. >

Scott, global pointers aren't too much of an issue, as good coders will use them only when necessary and they are often not performance critical.

Aliasing is the biggest problem with writing an optimizing compiler for C/c++. I personally avoid aliasing at all costs (as a result I often work with only pointers in inner loops (pointers that are declared as pointers and always accessed as pointers)). Then I hit the 'assume no aliasing' flag in MSVC.. it does wonders for the code generation.

Of course, I'm NOT your typical programmer, as I will drop down to inline assmebly when I need more performance.. but then again I fear I'm a dying bread (and luckily I'm only 24).. ;)

Steve