Originally posted by snadrus
View Post
To clarify - the instructions themselves are not any shorter. Shorter instructions wouldn't allow more to run anyway, as the cpu is limited by the # of instructions it can execute, not their size.
What is shorter is the memory addresses the program uses, which are register values the instructions operate on. Anyone who's looked at c/c++ code has seen pointers all over the place, and all of them are half the size in x32 code. I think general test cases have shown it to result in about 10% savings overall for an average codebase, although of course some programs will be more affected than others.
The smaller pointers do allow more of the program to be cached on the chip in various places, which is what can give a speedup.
example - code like
mov eax ebx
the mov instruction is the same size no matter what, it's the size of the value in eax/ebx that changes. Well, except you have to address it differently, but you get the point.
Comment