Twitter | Pretraživanje | |
Jonathan Blow 30. sij
Even though this podcast went for three hours, there are many things I wish I'd explained better. So I will attempt a better explanation of my kind-of-throwaway Amdahl's Law comment, as the situation is pretty interesting:
Reply Retweet Označi sa "sviđa mi se"
Jonathan Blow
Amdahl's Law is about what happens when you make a program faster. Usually we talk about parallelism, but it's really about optimization generally. If there's some part A of your program that you can make faster, and another part B that you can't, then in the limit, even if
Reply Retweet Označi sa "sviđa mi se" More
Jonathan Blow 30. sij
Odgovor korisniku/ci @Jonathan_Blow
you do a perfect job and make A take zero time and impart no additional overhead on B in communicating with A, the factor by which you can ever speed up the program is limited by B. If B is half the original program's runtime, the program can only ever get 2x faster.
Reply Retweet Označi sa "sviđa mi se"
Jonathan Blow 30. sij
Odgovor korisniku/ci @Jonathan_Blow
If it's 1/3 the original program's runtime, the program can only ever get 3x faster. The Wikipedia link here has some good graphs to help you visualize. I like Amdahl's Law because it's so obvious you might just think "duh, why are you telling me this?",
Reply Retweet Označi sa "sviđa mi se"
Jonathan Blow 30. sij
Odgovor korisniku/ci @Jonathan_Blow
but it's easy to make mistakes if you don't take this seriously. One such mistake happened during the time of the Cell processor and the PS3 / Xbox 360 consoles. (Both consoles made different versions of the same mistake).
Reply Retweet Označi sa "sviđa mi se"
Jonathan Blow 30. sij
Odgovor korisniku/ci @Jonathan_Blow
Today we're in a situation where you can buy a 32-core Intel CPU for not that much money ... but you can't buy a single-core Intel CPU that has 32x as many transistors. The reason why is because we just don't physically know how to do it. The single-core 32x monster would not be
Reply Retweet Označi sa "sviđa mi se"
Jonathan Blow 30. sij
Odgovor korisniku/ci @Jonathan_Blow
very much faster than one of the cores on the 32-core CPU. So when Intel wants to deliver more CPU power to customers, the main way they know how to do it is to add cores. Many people can't use most of those cores effectively, but some people can, so there is still a reason
Reply Retweet Označi sa "sviđa mi se"
Jonathan Blow 30. sij
Odgovor korisniku/ci @Jonathan_Blow
to do this. But, back in the early 2000s, the situation was different. We still knew how to make single processors faster by making their pipelines deeper and making them more out-of-order and speculative. But that was starting to take a lot of transistors, so there was this
Reply Retweet Označi sa "sviđa mi se"
Jonathan Blow 30. sij
Odgovor korisniku/ci @Jonathan_Blow
idea, hey, instead of using all those transistors to do this out-of-order stuff, we could just have (in the case of PS3) a bunch of blazing-fast SPU coprocessors that are very simple and linear, or (in the case of X360) three in-order main processors instead.
Reply Retweet Označi sa "sviđa mi se"
Jonathan Blow 30. sij
Odgovor korisniku/ci @Jonathan_Blow
Unlike today, where we don't have a tradeoff to make ... we just know how to add more cores, we can't make one core faster ... back in that time a tradeoff was made: we can have more potential compute power, *as long as we make the slow part of our system slower*.
Reply Retweet Označi sa "sviđa mi se"
Jonathan Blow 30. sij
Odgovor korisniku/ci @Jonathan_Blow
Because in-order cores are slower than out-of-order cores, potentially *much* slower in some cases. But people decided to do that. And this runs afoul of Amdahl's Law ... with it you should see clearly that making B twice as slow as it could be (or whatever) is going to be
Reply Retweet Označi sa "sviđa mi se"
Jonathan Blow 30. sij
Odgovor korisniku/ci @Jonathan_Blow
much worse than making A faster, in almost all cases, unless B is a tiny part of your program, which it never is, especially for games. Both consoles made anti-Amdahl tradeoffs; I think both would have been much better with just a single out-of-order CPU at the same price point.
Reply Retweet Označi sa "sviđa mi se"