The __restrict keyword doesn’t affect how the compiler itself aliases pointers: instead, it’s about what the compiler can assume you, the progammer, may or may not have aliased.
Archive for the ‘Programming’ Category
A load-hit-store is a large stall that occurs when the processor writes data to an address x and then tries to load that data from x again too soon. __restrict is a C++ compiler directive that helps avoid load-hit-store stalls.
If you want to divide an arbitrary X by an arbitrary Y, long division is pretty much the only way to go — slow even in hardware. However, if the divisor is known at compile time, there is very often a much more efficient way to compute the quotient.
The slides for my talk at the 2008 Game Developers’ Conference, “How To Go From PC To Console Development Without Killing Your Studio,” are now available online at the Valve website.