 For this example, we're going to be working with this problem where we've got two machines, they're each running the same program, and we'd like to know which one is faster than the other, and how much faster that actually is. So the problem asks you to calculate the relative performance of machine A to machine B. So in the end, we're going to be looking to satisfy this equation, and we'll have two times. So we're going to be looking for a relative performance ratio of, in this case, machine B over machine A. In this case, we have a workload that's composed of two different tasks. Task number one runs 1,000 times, and then task number two comes along, takes the results of all of those task number ones that ran, and does some work on them, compiles the results, maybe produces some nice output that shows you what task number one did. So task number one runs 1,000 times for every instance of task number two. Machine A and machine B each take a different amount of time to run these two tasks. Machine A runs task number one in 10 nanoseconds, machine B takes 15 nanoseconds. On the other hand, for task number two, machine A takes 30 seconds, machine B takes 45 seconds. So the first thing we're going to want to do is estimate the amount of time that each of these machines will take to complete the entire workload. Then we can plug those numbers into our equation, and we'll have the relative performance. So for machine A, we need to run task number one 1,000 times, and each of those require 10 nanoseconds. Then we'll run task number two once, which will take 30 seconds. 1,000 times 10 nanoseconds will give me 10 microseconds plus 30 seconds. So there's my 10 microseconds and my 30 seconds. So obviously the 30 seconds is dominating everything here. For machine B, I still have 1,000 squand that run. Each of those take 15 nanoseconds. And then we have one instance of task two, which takes 45 seconds. So 1,000 times 15 nanoseconds will give me 15 microseconds, and I'll add that to the 45 seconds. So again, there's my 15 microseconds and my 45 seconds. Now I've got these two times, time A and time B, and I just want to plug them into my original relative performance equation. So I have time B over time A, time B is and time A. Obviously my seconds will cancel here. And for the rest of this, well, my 45 looks like about one and a half times of my 30. And it turns out the 15 microseconds is also one and a half times the 10 microseconds. So this one reduces nicely to 1.5, which tells me that machine A is 1.5 times faster than machine B. This one I could have solved a whole lot easier just by noticing that each of the components is one and a half times larger, but that's not going to be the case for every problem. This one just happened to be a nice easy one to start with.