4 ms·
I wish I understood this, but lack a lot of the background in CPU architecture beyond a very superficial understanding (ex. what is meant by "branch prediction"
by tech_ken 3y ago
I wish I understood this, but lack a lot of the background in CPU architecture beyond a very superficial understanding (ex. what is meant by "branch prediction"). Can anyone recommend me a good source to help me get up to speed on this?
- neilmovva 3y agoI like this review: https://www.lighterra.com/papers/modernmicroprocessors/ https://www.lighterra.com/papers/modernmicroprocessors/ A bit dated, but the major ideas used in current CPUs are all covered!
- tech_ken 3y agoThis looks perfect for my needs, thanks a bunch!
- mrguyorama 3y agoYou're asking for a course in computer architecture. Buy a textbook. I recommend "Computer Systems" by J. Stanley Warford. We used the fourth edition in our class and I found it very enjoyable. It will cover all the way up from "How do you represent data in binary" to "how do you create an arbitrary digital logic circuit from a spec alone" to "here's a toy computer to play with".
- tech_ken 3y agoI'm aware what I was asking for. I appreciate the reference, seems like a good fit for my needs, have a good one!
- CalChris 3y agoIf you have a slow instruction like a load from memory, you could try to execute following instructions that don’t depend on the load (out of order). But what do you do when you run into a conditional branch? Conditional branches are taken and go somewhere else or they are not taken and just go to the next instruction. Branch prediction (really conditional branch prediction which is a form of speculative execution, think Spectre) is making that guess. Getting it right makes the code fast. Getting it wrong costs about 10-15 clock cycles and some lost energy. You can and Intel does throw anything at it, neural networks based on the stack return addresses, recent branch history, … anything.