Posted on January 12, 2009, 9:00 am, by eruskin, under
Programming.
The seemingly simple act of assigning an int to a float variable, or vice versa, can be astonishingly expensive. In some architectures it may cost 40 cycles or even more! The reasons for this have to do with rounding and the load-hit-store issue, but the outcome is simple: never cast a float to an int […]
Posted on September 6, 2008, 3:30 am, by eruskin, under
Programming.
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.
Posted on July 8, 2008, 9:00 am, by eruskin, under
Programming.
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.