4 ms·
I'd be keen to see a comparison of transistors counts between modern and older processors with caches removed (I could be wrong, but I thought built-in caches m
by petercooper 10y ago
I'd be keen to see a comparison of transistors counts between modern and older processors with caches removed (I could be wrong, but I thought built-in caches made up the majority of transistor counts nowadays). That is, how much more complex is a single cache-less core now vs then? Not as much as the overall transistor count would indicate, I suspect.
- ktRolster 10y agoThey're pretty complex. For example, the modern x86 (afaik) uses lookup tables to make multiplication faster. The 6502 didn't even have integer multiplication.
- vidarh 10y agoYes, we rolled it ourselves with ASL's (Arithmentic Shift Left) and ADC's (ADd with Carry) and the like, typically hardcoding it if we knew one of the operands. Particularly fun with pretty much always having to be prepared to deal with overflow since the registers are only 8 bit. I love the 6502, but I can't say I miss that part.
- qb45 10y agoAnnotated die photo of a single-core VIA Nano chip from some 10 years ago: https://en.wikipedia.org/wiki/File:VIA_Isaiah_Architecture_die_plot.jpg https://en.wikipedia.org/wiki/File:VIA_Isaiah_Architecture_d... As you can see, caches are merely half of the chip and half of the rest is about dynamic instruction reordering, branch prediction, register renaming and stuff. These things have pipelined execution units so they can start a new instruction before the previous one is finished executing, enough duplication to start executing two or three instructions per cycle (sometimes even of the same kind, say two floating point SIMD additions) and logic to schedule instructions wrt data dependencies, not program order, so that instructions which need input data not yet available can wait for a few cycles while other, later instructions are executing. And all of this has to be done with some degree of appearance of executing instructions serially, so if say some instruction causes a page fault and a jump to the OS fault handling code, the CPU has to cancel all later instructions which may have already finished executing :) And, btw, this is not in any way specific to x86. POWER, high-end ARM, they all do it.
- 72deluxe 10y agoFascinating. Where do you learn this stuff? Any recommended reading you can point me to as a complete novice with regard to CPU architecture?
- projektfu 10y agoMany CS departments teach from Patterson and Hennessey, Computer Organization and Design for intro, Computer Architecture: A Quantitative Approach for advanced.
- qb45 10y agoThat's somewhat hard to answer because I've been accumulating knowledge from many sources over many years, and it started with some dead-tree book from the '90s :) Maybe Agner's site, in particular his microarchitecture manual, would be a reasonable place to start: http://www.agner.org/optimize/ http://www.agner.org/optimize/ There are "software optimization manuals" from CPU vendors, but these may not be particularly novice-friendly. I think I've used Wikipedia at times for general CPU-agnostic concepts, though it has a tendency to use jargon with tittle explanation. Occasionally somebody submits something to HN. On the lowest level, it may be helpful to know some simple digital circuits (decoders, multiplexers, adders, flip-flops, ...?) just to have an idea of what kind of things can be done in hardware.