On 11/25/26 6:31 AM, Terje Mathisen wrote:
> MitchAlsup wrote:
[snip]
>> Power consumption killed P4
> > Power consumption was probably the final nail in the coffin. > > IMHO the fact that they broke both shifts and integer MUL in their quest for double-speed inner core meant that a lot of code which needed complicated addressing, like multi-dimensional array access without dope vectors, suffered quite badly.
I think the trace cache implementation also contributed to the failure of the microarchitecture. If I recall correctly, the trace cache was filled by a slow, sequential decoder (one instruction per cycle) and had relatively small capacity (12k µops but "a hit rate similar to an 8 to 16 kilobyte conventional instruction cache", "The Microarchitecture of the Intel Pentium 4 Processor on 90nm Technology", Darrell Boggs et al., 2004). The maximum front-end fetch was three µops per cycle, so its per-cycle fetch/decode was already slower than the Pentium II (at least when software matches the 3-1-1(?) template; a sequence of two µop instructions would only decode two µops per cycle). Reducing the cost of branch misprediction by removing decoding latency and reducing the cost of taken branches by using traces makes sense for a high-frequency x86 design with then state-of- the-art branch prediction. µop caches were later widely adopted for the latency and power advantages of avoiding x86 decode. The small (16 KiB in Prescott, 90nm; 8 KiB in Williamette) Dcache may also have contributed to performance issues. The initial choice of Rambus DRAM hurt the product attractiveness initially (from what I read) from latency, power, and cost (though it provided higher streaming bandwidth), but that requirement was reverted somewhat quickly from what I recall. (Note that partial virtual tag way prediction introduced by Pentium 4 has also been widely adopted, though more delayed than µop caches and probably as much or more for energy than latency.) I seem to recall that for streaming media workloads, Rambus DRAM and hardware prefetching provided good bandwidth. The increase in laptop sales would make poorer performance per watt more unattractive for a larger fraction of the market. I think Pentium 4 also introduced "data free" reorder buffers, so data was not copied to architectural register storage on commitment. I am not convinced that staggered ALUs are necessarily a bad idea. Such provides a means to trade power and latency by exploiting the lower criticality of the more significant bits for most operations. (While a left shift has a dependency issue, such are not especially common and the added latency could be small.) Doing half an add per cycle might save a little energy (though most of the "back end" energy per compute operation, I think, is in the scheduler).
> Also, every switch between a sequence of inner core double-speed opcodes and anything else caused a significant bubble. (Probably also adding to the power drain?)
Apparently Willamette (180nm) shift latency was 4 (slow/main) cycles and multiply latency was 14 cycles. That is slow even if the frequency was twice has high (rather than perhaps 40% higher?).