Hi! I'm Lexi, I wrote this article/mini-book. There's a classic question of "what happens when you load a website?", but I've always been more interested in "what happens when you run a program?". About 3 months ago, I was really annoyed at myself for not knowing how to answer that question so I decided to teach myself. I taught myself everything else I know in programming, so this should be easy, right? NOPE! Appare…
I'm 17 and wrote this guide on how CPUs run programs
181–190 of 327 posts
Re: I'm 17 and wrote this guide on how CPUs run programs
#182Earlier quoted context omitted.
> However, the details of modern branch predictors are proprietary, so we don’t have authoritative sources on them. I focused on Computer Architecture for a masters degree and now I work on a CPU design team. While I cannot say what we use due to NDA, I will say that it is not proprietary. Very nearly everything, including the branch predictors, in modern CPUs can be found in academic research. Many of these secrets…
I’m not related to academia. I don’t design CPUs. I don’t write operating systems and I don’t care about these side channel attacks. I simply write user-mode software, and I want my code to be fast. The academic research used or written by CPU designers being public doesn’t help me, because I only care about the implementation details of modern CPUs like Intel Skylake and newer, AMD Zen 2 and newer. These details hav…
What the GP is saying is that all the details of how modern processors work are out there in books and academic papers, and that the material covered in graduate-level computer architecture courses is very relevant and helpful, and they include all (or nearly all) the techniques used in industry.
From the GP's perspective, it doesn't matter at all if the course taught branch predictors on a MIPS processor, even though MIPS isn't really used anywhere anymore (well, that's wrong, they're used extensively in networking gear, but y'know, for the argument). They still go over the various techniques used, their consequences, etc., so the processor chosen as an example is unimportant.
You're saying that all this information is unhelpful for you, because what you want is a detailed optimization guide for a particular CPU with its own particular implementation of branch prediction. And yeah, university courses don't cover that, but note that they're not "outdated" because it's not as if at some point what they taught was "current" in this respect.
So yeah, in this sense you're right, academia does not directly tackle optimization for a given processor in teaching or research, and if it did it would be basically instantly outdated. Your best resource for doing that is the manufacturer's optimization guide, and those can be light on details, especially on exactly how the branch predictor works.
But "how a processor works" is a different topic from "how this specific processor works", and the work being done in academia is not outdated compared to what the industry is doing.
PS: Never believe the marketing in the press release, yeah? "Neural network" as used here is pure marketing bullshit. They're usually not directly lying, but you can bet that they're stretching the definition of what a "neural network" is and the role it plays.
Re: I'm 17 and wrote this guide on how CPUs run programs
#183Earlier quoted context omitted.
Hacker News automatically removes the word "How" from the beginning of submissions (and then Title Cases them for good measure) - so I believe submitting that title would instead result in this: I'm Helping My High School Peers Learn About CPUs I might be wrong though, it might only do this with "How to ...".
'How to' is one of the title forms that isn't modified, currently.
Re: I'm 17 and wrote this guide on how CPUs run programs
#184Hi! I'm Lexi, I wrote this article/mini-book. There's a classic question of "what happens when you load a website?", but I've always been more interested in "what happens when you run a program?". About 3 months ago, I was really annoyed at myself for not knowing how to answer that question so I decided to teach myself. I taught myself everything else I know in programming, so this should be easy, right? NOPE! Appare…
I also saw this dynamic in the cryptopals challenges, where I thought the hardest problems were "look up this off-the-shelf cryptosystem and implement it", not "find a flaw in that system you reimplemented with only a few hints.[2]
Like others, I recommend nand2tetris as having answered a lot of the questions I had. It has you implement the hardware of a computer that can execute the program loaded in its memory, from the logic gates and flip-flops up. Then, you implement a compiler that can translate high-level Java-like code into binary. (First to a virtual machine, then assembly, then binary.)
Of course, even then it leaves caps: it's a deliberately toy system, it can't handle programs longer than its memory, the machine does only one-shot programs (and thus can't handle a programmer creating a program live and having it be executed). But it answered a lot of my questions, like how to make memory work, and how function call/return work.
[1] http://understandingbitcoin.us.
[2] Previous comment about it: https://news.ycombinator.com/item?id=36398627
Re: I'm 17 and wrote this guide on how CPUs run programs
#185Where did you hear Linkin Park?
Re: I'm 17 and wrote this guide on how CPUs run programs
#186Earlier quoted context omitted.
I haven't done the research, but I can't believe most of the information could be that hard to find or wrong, at least if you know where to look. These sorts of topics are usually well-covered in the matching undergraduate-level computer science courses (computer architecture and operating systems, which, these days, are mostly optional since out of fashion). Several universities have free courses available, and some…
I share the OP’s opinion that a lot of available information is incorrect. It seems the industry is moving faster than the academics who write books and university courses can update these sources. Big endian CPUs, CPU architectures other than AMD64 and ARM, x87 FPU, are examples of the topics which are no longer relevant. However, these topics are well covered because they were still relevant couple decades ago when…
cough RISC-V cough
Re: I'm 17 and wrote this guide on how CPUs run programs
#187OP, you should take a look at Casey Muratori's course at computerenhance.com The first part of the course's homework creates a simulator of the 1978 intel 8086 (which modern x86_64 assembly still closely resembles). You will learn a lot of things about computers that are really difficult to find elsewhere.
Re: I'm 17 and wrote this guide on how CPUs run programs
#188Earlier quoted context omitted.
I only browsed this but it seems like a pretty cool primer. Loving the style as well. It's also a very good idea to write these types of resources when you teach yourself something new because it clarifies your thought process and helps you identify parts that are still unclear even though you initially thought you understadn them etc. I also liked this at the end: """ I talked to GPT-3.5 and GPT-4 a decent amount wh…
I'm glad you enjoyed it! > It's also a very good idea to write these types of resources when you teach yourself something new because it clarifies your thought process and helps you identify parts that are still unclear even though you initially thought you understadn them etc. I found this to be very much the case. As I wrote the article, I discovered so many things that I didn't properly understand. It partially to…
I have run across so many resources where it is clear that they author was both a learner and had little interest in going back to improve their work for clarity and accuracy. Your work is clearly several leaps beyond that. It is clear and the portions I have read are accurate. It leaves me wanting to go back to read more and I am confident you won't disappoint.
Thank you for your contributions and I wish you the best in your future endeavours.