To: minnow68 who wrote (74081 ) 3/8/2002 4:14:55 PM From: Petz Read Replies (2) | Respond to of 275872 Mike, what Ali is referring to with "register renaming technique" is that the microprocessor itself makes optimizations to the code as it is running. For example, suppose we have the code, x=(x*c)-(y*s); y=(x*c)+(y*s); /* this could be part of an FFT */ The compiler may invent a temporary variable to hold either or both products (call them TEMPIJ and TEMPKL), if it doesn't have enough registers available. But when the code actually runs inside the Hammer, it has been converted to RISC86 micro-ops. This code stores both products in registers that the programmer or the compiler doesn't even know about. The CPU just uses any register than doesn't contain anything at the moment, and "renames" it to be whatever register the compiler generated code for. Although it will still store a value into TEMPIJ and TEMPKL, since it can't easily analyze if some later code is going to try and access these memory locations, it will retrieve TEMPIJ and TEMPKL from the registers they were calculated in, registers that 1) the compiler did not know about, and 2) the programmer did not know about. The memory writes to TEMPIJ and TEMPKL are probably inconsequential for execution speed, because they get written to the L1 cache making that cacheline "dirty", but probably don't get written to memory until that cacheline needs to be replaced, most likely not within an inner loop. So if these statements are part of a loop that gets executed 1000 times, TEMPIJ and TEMPKL probably get written *once* and read *nunce*. So the 64-bit Hammer should have *lots* of extra registers available for the CPU to use whenever it wants to store temporary variables. Since the top 32 bits of the special 64 bit registers are not even accessible to 32-bit code, the CPU will already do some of what a good assembly language programmer or superb compiler would do if it knew about them. The only possible "gotcha" with this idea is that, if the x86-64 programming guide says that you don't have to save and restore registers when going from 64 to 32 and back to 64 bit mode, then the CPU had better not mess around with stuff the programmer has assumed is going to stay unchanged on mode-switches. Having said all this, compression and decoding operations may be more efficient with 64 bit integer arithmetic. IIRC, zipping and unzipping jumped in efficiency going from 16 to 32 bits. Petz