Article: AMD's Mobile Strategy
By: gallier2 (gallier2.delete@this.gmx.de), December 22, 2011 7:57 am
Room: Moderated Discussions
Wilco (Wilco.Dijkstra@ntlworld.com) on 12/22/11 wrote:
---------------------------
>This is the kind of stuff that gives RISC a bad name. And now it is no surprise
>to me why Sparc is so slow - everything else is likely as inefficient. You do not
>need more than 4GB of global variables, so you need at most a 32-bit immediate (PC
>relative or absolute) to access any global. Or even better, reserve one of the 32
>registers as a global pointer so up to 8KB of globals can be accessed directly using
>a single load/store. For DLL/shared libs you need to do something more elaborate of course but that's fine.
>
When I saw that I changed my program to be more object oriented, meaning that I build a top structure with my globals (even with pointers for stuff in the libraries), being careful to not go beyond 4096 bytes size (max isplacement in addressing mode of SPARC) and passing that pointer to every called function. By doing that I managed to get the app from a file size of 220K to 135K. The code size was reduced by 50K, the rest was due to better data structures.
The icache pressure went down spectacularly, though I don't remember the numbers (did the test once 3 years ago).
---------------------------
>This is the kind of stuff that gives RISC a bad name. And now it is no surprise
>to me why Sparc is so slow - everything else is likely as inefficient. You do not
>need more than 4GB of global variables, so you need at most a 32-bit immediate (PC
>relative or absolute) to access any global. Or even better, reserve one of the 32
>registers as a global pointer so up to 8KB of globals can be accessed directly using
>a single load/store. For DLL/shared libs you need to do something more elaborate of course but that's fine.
>
When I saw that I changed my program to be more object oriented, meaning that I build a top structure with my globals (even with pointers for stuff in the libraries), being careful to not go beyond 4096 bytes size (max isplacement in addressing mode of SPARC) and passing that pointer to every called function. By doing that I managed to get the app from a file size of 220K to 135K. The code size was reduced by 50K, the rest was due to better data structures.
The icache pressure went down spectacularly, though I don't remember the numbers (did the test once 3 years ago).