That's how a former Jamaica Football Federation president describes the current administration in his criticism of their handling of the contract renewal of former reggae girls coach Lauren Donaldson speaking in an interview with Sportsmax.tv. Tony James said it was unwise for the current administration to split from Donaldson. Here's what he said. The upcoming election is the exact reason why that decision with Lauren is poor. If you have an election in a couple of weeks, why are you going to make a move like this? You have a lame duck presidency and administration. Why are you going to take on a massive investment for a national women's coach when JFF is still in restrictive financing? Why would you want to do that now? So that decision is a matter of bad timing. So let's welcome Tony James to the Sportsmax Zone and we're going to discuss his comments and give his overall critique of the Ricketts led administration. Tony James, welcome to the Sportsmax Zone. I haven't seen you in years. Great to see you again, sir. Thank you. Thank you, Lance. Yeah, just to expand on some of the comments that you were quoted on Sportsmax.tv, the story there, a lot of discussion has gone on about the law on Donaldson, non-renewal of his contract. I gather, though, that this narrative that he made his own bed by constantly criticizing his employers is beginning to gain traction and legs more than it was when the decision was just made. Yeah, that's possible because you have a clash of cultures. You have, I think, both in Hugh and Lawrence case, you have people coming out of an American system, probably the best in the world, with all the resources and facilities. The best in the world? We're talking football. I don't think in terms of the youth football program and the women's program, yeah, it's one of the best in the world, top five, at least, in the world. And they have all the resources. They don't have to ask for anything. When they come to Jamaica, even though they're Jamaicans, they expect a certain level of competence and they haven't got it. And you have a federation who is struggling financially in problems trying to keep the program going and it is unacceptable for anybody to be criticized in a GFF in the way that any of these are criticized. They may be very clear on it. But all things being equal, I would agree with the GFF, but all things are not equal because when you put a program of that magnitude in place at international level, then you have to follow through and support it administratively. The man has no support administratively. If you remember, the girls were very vocal, very focused, and they have proved quite correct. And all Lawrence done is take on their bad attitude in terms of being the spokesperson for the women's program. She didn't need to have that. If he had a strong manager, he wouldn't be involved in that. Lawrence is a very, very simple person. You couldn't want a simpler technical person. If you saw him when Hugh was there, you hardly heard from Lawrence. You heard from Hugh. Now, when Lawrence is there with no support, who do you hear from? That is the issue. That is the problem. Yeah. But you did say two minutes ago that given his outburst against his own employers, let me see if I understand you correctly, that the JFF, based on normal business practice, was in its right not to renew his contract? No, no, no, no. All things being equal, you can't have your employer going out and making comments like that. That is a fact. That is indisputable. But you have to make sure before you make decisions like that, that you have given the processor chance in terms of the discussions, the support. And if you listen carefully, none of those were there. Yeah. Do you think, though, that this decision and the fact that Lawrence is no longer employed as the reggae girl's head coach, will cost the Michael Ricketts administration? Not more than that. This is just one more blunder. I don't think no. I don't think this is ... Listen. The women's program had to be reset anyway. All I'm saying at the timing is pathetic. Yes. That's all I'm saying. You have two games in three weeks. You have a president who goes on a limb against all his advisors, technical advisors, to a point to learn in the first place when Vin left. You have a president who should be glorifying the fact that that decision ... Man, I'm a genius. Look at what I did. In fact, he didn't do it. Others did it. What I'm saying is a president ... He stood up for Lorne. You should be able to say, gentlemen, we were wrong. Look what the man has done. Hold on. Let's review. Let's hold on. Hold on a bit. No. You don't see many women in the picture. You don't even know who made the decision. Can you say that, based on the current position of this presidential race, that Ricketts is ahead or would he be behind Raymond Anderson, his vice president, who is challenging him? That is a good question. I went to a meeting. I was invited to a meeting in Manchester with the Manchester FA. We all spoke to a gentleman called ... I think the FIFA accountant here. And I think after that meeting, the Manchester Football Association realized what I had been trying to say to them for the last five years. Because first of all, the man outlined that we were five years unrestricted, funded. Nobody seemed to know that. For the last five years, we've been unrestricted, funded. The director there thought it was three years. The clubs there did never clue that we were even unrestricted financing. So when Mr Kool was finished, when it was out of that meeting, and the clubs and the members started to ask questions of the director, it was very obvious to all that the Jamaica Football Federation, Management Committee rules football, and that they only tell the directors on a need-to-know basis what they need to know. So the directors and the parishes and the parish personnel sometimes are lost when the clubs ask them because they really don't know. Now that's a shock to us that that is, I mean, we couldn't, we criticized, but we couldn't as clubs have ever understood that the GFF is running that manner. We could understand, for example, the most critical item on that agenda at a meeting should be your finances. And they have inherited a situation where they give out the finances, they discuss the finances, and then they take back all the documents, it's not to be discussed with anybody. Now that is, that is in terms of a confidential run administration. I don't think this particular issue would have lasted many years. I think after that meeting, at least the clubs in Manchester understood where we are in the admin in football today. Yeah, but I'm still waiting for the answer, though. Which one? Is Ricketts ahead of Anderson, as far as you're concerned, in support among the delegates that will vote in December? No, I don't know that. I don't know that.  Well no one knows for sure, you know, Tony, because we know who these elections are. Delegates will pledge their support to someone and then not give it, but just on the ground as a football man from what you're hearing and a former JFF president, and you understand how this system works, even though the delegates list has grown to 56 from 13, so things are a lot different now than from they were before. But just your gut feeling, do you think... No, I don't... Let me ask a different question. Do you think he's the favorite to retain his... Who? Ricketts? Ricketts, the favorite to retain the presidency? No, I can't answer that, because to be frank with you, I am closer to the... But you're Tony, you're not Frank. No, I'm closer to the 13 presidents who would vote. I really don't know the composition and the voting positions of those who now make up the 56. Can I ask you a different question though, because I really want to get your thoughts on this. Has Michael Ricketts failed as a president? No. He hasn't failed? No. The GFF, listen, the GFF is a difficult and very ungrateful job. We're in a wagonist nation who only applaud when we win and we do well, and are quick to criticize when we don't. At the same time, they have very little financing for development, but a lot of criticism. So you see, this perennial lack of adequate funding brings unrealistic expectations to any GFF president, including Ricketts. I think they have tried their best, they have made a lot of mistakes, but I think the issue with them is their credibility, the trust underway going forward, and I don't think they're very clear on that. Yeah. And as we know, we've been very aware of the fact that many football federations are faced with financial issues. It's not only in Jamaica, we have it back in Trinidad and all across the Caribbean. For me though, the fact, because you said it just now, the transparency has been an issue. Ricketts has been in power since 2017 to using the people of Jamaica and those making the decisions have had enough to the point where they'll say, maybe let's give another person a chance, and as Raymond Anderson, the vice president, the right person to give that chance. Now you see, I ask no question I can answer. Because the people of Jamaica don't vote. If it was left to public opinion, Ricketts would never chance. But Ricketts has mastered the political, he has inherited a corrupt construct in his administration. That is that he has inherited. I think the JFF as a body will accept that, that 13 people couldn't possibly represent Jamaica. Is 56 a good representation? I think it is reasonable. I think we had a constitutional exercise which took four years. A simple constitutional exercise took four years because this was FIFA's mandate. And at the very end of that mandate, they had a vote where people still don't realize a lot of the parishes abstained. If club football is accepted as a people who really own football, and you look at the parishes who abstained, you'd have a greater majority of clubs abstaining than supporting because the Jamaica Olympic Association fell flat on its face in carrying out its own mandate or its own promise to make sure that, island-wide, that constitutional amendments would be understood by them. So I know in our parish, for example, we didn't have a clue, and that parish president stood up and said, listen, I can't vote for it because I don't know anything about it.  So that is where we are now. That is the reality of football. We're not strong in constitutional things. We're not strong in marketing. We're strong in football. Yeah. Tony, you were president of the Jamaica Football Federation between 1985 and 1992, and your work as an administrator landed you a Hall of Fame concaka induction, didn't it? That's a long way back, eh? Yeah, about 2009 or something. But I'm going to ask you this, though, because after leaving in 1992, we've had Herondale as president, Captain Horace Burrell as president twice, Boxhill between that, and Ricketts. What's your rating of where football administration has gone? A lot has happened since you left in 1992, including a qualification for the World Cup historically in 1998. What's your assessment of the quality of administration of football in the country since you left in 1992, given the presidential list that I just presented? No, but it includes me as well, because I'm part of the package. We do the JFF shuffle. At all times, two steps forward, we have to take one step back. We take one step back not only because of the politics, but because we do have the funding. It's a national sport. And the nation doesn't seem to realize it's a national sport. We do have a national commitment to this national sport. In a way, it's unfortunate that cricket is where it is in the state it's at. It has helped football to promote quite solidly the fact that football is the national sport of this country, because some in middle class Jamaica are still pining for cricket. And this is a part of the problem. And any president is going to have to go through that. So, given where we are with the situation and the Jamaica Football Federation and an election coming up, because this election constitutionally is due before year-end, Mariah just asked you about Raymond Anderson and his push to replace Ricketts as the president. How divisive and volatile do you expect this campaigning period to be because so often we hear of a president being elected and the first thing that they've got to do is to embrace everyone and mend those fractures? Yeah, no. Again, I can't judge. But I don't think it should be that divisive. They have a choice. They do at least have a choice. And this is what people do understand. A corrupt structure doesn't mean that you're stealing money. This is what some people interpret it. I have never and would never accuse anybody of that. A corrupt structure simply means that you are taking on responsibilities for a nation that you can't take on. And if you look under this administration, that is what they have inherited. And that is where we are at now. Anderson only has a chance. I mean, that's a political headlock you're having because you can't get in. Nobody else can run. If you have 13 presidents, you only have to make sure seven are taken care of. And the public perceptions that they're taken care of out of, mainly out of trouble policy. And yeah, but Tony, the fact is that the delegates that vote go now way beyond the 13 parish bosses. You know, there is Issa. There is the referees association. There's the pass players association. So that that that decision for the presidential vote extends now way behind, way beyond just the parishes. And this is the first time in recent history then that you'd have removed that headlock and allowed anybody at all to come in. And who are you letting in? Because the public perception is, hey, it's Tweedledom and Tweedledee. So what does that mean for Jamaica? They mean that, listen, people have to understand where the football was supposed to go. When Conker, Coffin, FIFA laid out, you have a technical mandate and you have an administrative mandate. And when they laid out that mandate, they would have thought that Jamaica would take it on. They would make sure that our technical mandate separates the professional part of the game from the amateur part of the game. In everything that these people have done, the international bodies, we have found a political way of politicizing it, trying to get around it. So we have spent four years to our constitution. We have done, he has done an excellent job. They have done an excellent job with the Premier League, where they have embraced the private sector, which was necessary. And that's on the way. But the rest of the program is very poor. What about this? From tier two right down to youth. Youth development hardly exists. We have had a competition format that has been the best. It matches anywhere in the world, being put on by Conker, Coffin. And yet we can't produce a team. We end up with the youth teams, giving them two weeks training, one week training, not going visa problem. It has been a disaster. As you say that, do you have any comments on Craig Butler's Phoenix Academy? In terms of? The development. What it's produced? As a developmental tool for some of your players. What has he produced? A couple of outstanding players who have made it to the highest level of football. Yeah, but no, but that is not Craig Butler alone. You give- No, I said his academy, the Phoenix Academy. No, but this is, listen. The technical program needs a serious reset. It has its pluses. I think our senior teams have done well. Our women's team have overachieved. Our junior teams have just been left lagging, just been left. It needs a reset in terms of women's football, the parish associations, which need really serious help before they collapse. They are in the verge of collapse in some of them. Schoolboy football and what you have come to know is academies. All of these things need a reset. It needs a national discussion as to where we are with all of these things. And more. We need to rethink and decide what we're doing about our overseas players versus our local players. There are a lot of things to discuss in private. In the privacy of the football family, in a way that is not like Lawn Donaldson. In a way that is not meant to embarrass anybody, is trying to get you all in the same boat, rowing in the same direction. I think, to be very frank with you, Rickett's problem is that his credibility has been shut for a very long time. He has made up ground with his new general secretary, but trust is something that once you have given it up, it's very hard to get it back. And when you look on our national teams, just like Lawn's outburst being unacceptable, it is unacceptable at our national teams. All of them be at odds with the national federation. A part of it is financial, but a part of it is just very poor administration. And in every case, both in the senior men and the senior women, they have carried a position which has been successful. They've had to remove people who had no competence. And why is that? Because of the general feeling that those around the president are allowed anything they want, and the president has to give them everything they want, because that is a political vote in headlock you have in the GFF. Yeah. Now, you want to see something that is really amazing? Look at what has happened out of Montego Bay yesterday, because football is a resilient sport, you know. Regardless of who it is, we have, in every presidency you have mentioned, we have survived, we have done better. We have taken on the Caribbean. We are getting there. But we can't wait two steps forward, one step back. And you look in Montego Bay now, what Montego Bay has done. That is what I think Conkercraft envisioned for the island, that we take professional football and put it in a bracket by itself, let this underpin our national teams and watch Jamaica soar as we spend money and separate the two. We can't do that. We have to get a tier two, a Premier League which is 16 teams. I have never heard of quality being gotten out of quantity. You have to compress quantity to get quality. We are the exact opposite because the vote of the parishes determined that. And that is our problem. Yeah, I said, question, who is ahead and who they'll vote for? It depends on their understanding of what is going on because believe me, I think some of these parishes don't know what is going on. And that is tragic. That's some of the parishes because rural Jamaica is a sleeping giant. In my time as president, I can tell you everything was Kingston. It is when rural Jamaica came through that you saw the strengths of rural Jamaica and we have to get those two in tandem. You talk about a presidency. What you have here now, people have to understand that we serve this sport and it's a time to give it up. When you look now and raising the bar out of the professional Premier League, I think in the next election, that is where we'll see quality coming out of the Premier League. If we can get the Premier League properly financed and get more people, quality people attracted to the Premier League. Tony James, great talking football with you for the last 10 or 12 minutes. We hope to have some more discussions with you. And of course, we'll be monitoring very closely the lead up to this JFF election for the new president, although it could be the same president. But thanks for joining us. Thank you very much. David, thank you very much. You're welcome. We'll be back with more on the sports night, so and after this.


Well, hello there people of the internet. Oh man, today's gonna be a good day because we're looking at memes. Yeah, and not just any kind of memes, but great memes. Hey, if y'all new to the channel, be sure to subscribe. I also have a new channel that's at 140,000 subscribers, top link in the description, go hit that, or do none of those things. It's up to you. But hey man, I put out a tweet, that's what I said. I need you to reply with the funniest memes you got under this tweets and y'all did. So now I'm going to verify. Cause if this is the funniest y'all got and it's not funny, we're gonna have some problems. I'm gonna leave a playlist link in the description if y'all wanna see the other meme review videos. All right man, let's get into it. First meme is sent by SimplyGrinding. He sends this one, not a meme, just soon to be a reality. And here we have a photo of James Harden Russell Westbrook Rockets Defeat the Bucks, 120. What year is this? 2020.   Grinding, we all know the Raptors are gonna be the champions this year, back to back. Y'all be forgetting Toronto on the chip. Y'all aint they got better with El Kauai. Stop playing on our name, Grinding. It's not funny. You're trying to be funny, but it wasn't funny. One out of 10. Blashin' replied to Grinding actually and this is the top reply to that. Words speak louder than words. I mean words speak louder than sentences. And that's true. Nadex has never told a lie. Words do indeed do both of those things. 2K News sends in, oh, this is 2K20 Insider, sends corner sitters after watching the guard ISO the whole game. Well, hopefully I don't get copy striped. I might have to sing along or something. They be working so hard. I don't do nothing.  So I just transcribed it for you guys because I don't want Lil Uzi making all the dollars from this video. I have to buy camera equipment and stuff and car parts as it relates to the meme though. True. It's so accurate. And I relate to this at my core. You know what I'm saying? I'm gonna give this a solid, solid seven and a half out of 10. Good meme, but he's not trying to get a copy. I'm glad you know. Oh, he already knew. Look at his name. Agents meme plug. Hold on. Let's see what you have to offer buddy meme plug friend. Twitch when they added the new copyright rules. It's all over for you, my brother. It's all over. What's wrong with this guy? Has anybody checked on him to make sure his brain still operates and functions? Hey, that meme was very like, it was like a, ah, you know what I'm saying? Ah, I know it's not your best work, man. Five out of 10. Oh my God. God. Send the meme last time. It was almost a relief, but I'm not gonna hate. I promise you guys I'm not gonna hate for no reason. When iPod sends a meme, you have to brace yourself, right?  Like a baseball game that nobody attends cause the sport is dead. Huh?  And for some reason that excites me. When she warns you, she's gonna try something new. And here we have Michael Jordan looking down at his dingus all excited. iPod. I don't know what to think about this meme. Yo bro, let me ponder on this with my board of directors real quick, man. Hey, yo, Duke, I'm recording a video. I need your help real quick. When she warned you, she's gonna try something new. And it's Michael Jordan looking at his dingus. You know he was looking at that, man. What would you rate that meme? Yeah, yeah, yeah. A six? All right, Duke is off the board. He's using the nice scale. You know the scale that starts at five cause you don't want to hurt no one's feelings. I use the zero out of 10 scale, whereas zero means it is the worst imaginable meme. Five means average and 10. So we just have to have a meeting and we have to recalibrate what we're rating exactly what. So Duke's nice six is equivalent to a real two. iPod, King Carter, that is a two out of 10. Willead responded, as an authorized reviewer, you are on a one video suspension due to the smile that was revoked from my face when I saw this. iPod responds, the bias with a shack emoji or I guess that's not an emoji, it's actually a photo. It says it's a gift, but oh, it is a gift. Wow, look at that guys. It's moving finally. Well, we got through that. If we can get through that, we can get through anything. Subscribe to the channel, guys. I'll just be plugging it like anywhere, you know what I'm saying? iPod posts a meme for agent to rate. The comments. You 36, you 36. Hey yo, iPod's not as old as everyone thinks he is. I don't know why he never says his age, but he's not 36. That's a funny-ass meme though. That's like an eight and a half out of 10. The top reply to that meme was this video of Solomonati dancing excitedly. Why does this video bring so much joy to my face?  RDC world one burner sends this one. How 2K developers are gonna be now they got an NFL 2K, NHL 2K, PGA Tour 2K, WWE 2K and NBA 2K to deal with.  Yeah. Bro, can you please cover my shit? My family coming down here. Bro, that's what I'm saying. I can't. I work every holiday, that's what I'm saying. I'm not doing it. I'm not doing it. Every holiday I'm working, and you not. Halloween, they want Christmas Eve, they want to meet Christmas. I don't know if I got a family no more. Like, I ain't seen them. Hey, hey, hey, Mike Wang is watching this video right now talking about how accurate this right here is. Cause I know Mike Wang feels like that. Yo, bro, he told me he worked 80 hours a week. Oh my God. And we all know what the solution is, man. Isn't that so funny? We just all know what the solution is, but it's not being solution and solved. I think is the word I was going for it. The way they do brawny on stream. Thank you, I wish I could get spanked by LeBron. Why would you send that to, what is he, like 16? You sent that to a 16 year old man. You told a 16 year old celebrity that you wanted to get spanked by his dad. Bro, are you okay? Is there something wrong with you, man? Is that what's happening? Is something wrong with you? Hey, yo, check him into the ward. Check him in. When iPod King Carter sends a meme. How many times do we have to teach you this lesson, old man? Again, he's not as old as y'all think. Oh, is it the same one? Oh, he said, I apologize to all those whom I've offended, crop version below. Gardeep, why don't you look at that, Gardeep? Well, first of all, I already seen this exact thing, but with a different, the same caption before, all right? So I wasn't truly impressed because I seen it before. It's like if you went to a dunk contest and just did a dunk, somebody else just dunked and did before. It's not as impressive no more. But the fact that you were willing to improve on it and drop a cropped version, even though you clearly did a disable resample, buddy, all right? You need to work on that. I think it's admirable. I'm gonna give you a six out of 10. I'm sweating, guys. You see the first drop of sweat right here? So you know it's a good video. When you get a contact dunk animation, but it switches to a layup. We need, ooh, I was about to catch up. I wonder what that was in context too. Very curious. Gym teachers once the hot girl find, I'm not gonna even actually watch this meme. What is wrong with y'all? Man, what the hell, guys?  This one says they really got swags and looter badge. And look, guys, the windows look looted up. Wow, actually, this is the first 10 out of 10 meme in a couple videos, man. Congratulations, that was funny. My big man went he wide open in the stage. Are you sure he wants to sell? That's not only just a solid meme. It's not a good meme. It's not a great meme. This is the incredible meme. I can't help but give it a 10, but it's so incredibly funny. I can't help but give it an 11. Yeah, ladies and gentlemen, this is the first 11 in a very long time just because of how so rock solid, concrete, great and incredible it is. So congratulations, smooth, great meme. When you go in for a driving layup, but instead do a pull-up jumper, Sony will release their new console at a cheaper price knowing that the flight reacts to the world are gonna spam by controllers so they can make all their profit back. But let's go back to the meme. When you go for a driving layup and instead do a pull-up jumper, that's Acreus. We've all been there. In fact, somebody had that exact thing happen to him and he lost $250,000 in that my team tournament earlier this year. So he 100% relates to this. He knows about the Acreus-E. Oh, that being said, ladies and gentlemen, just a good quality meme. I'll give that a six and a half out of 10. Me, can I shoot my shot? Her, tireless defender. Why would you ever ask a girl if you could shoot your shot?  Have you ever done that before? Bad meme, said I'd take Hall of Fame box. Hey, how's the response to your meme, funnier than your meme, man? God damn. When you play in my career and your A.I. teammate fires up a highly contested, off and open look pass. What more do you want from me? What more do you want from me? How did this happen? Was he joking when he did this? Was he actually crying? I have questions. But this is just such a quality meme, man. That's an eight out of 10. This is a photo sent by Rob, Zodiac signs.  Ah, very unrelated to anything else we've done so far this video. But also kind of true. When you try a new jump shot and find out it's broke. I'm not, I'm not, I'm not, I'm not, I'm not, I'm not, I'm not, I'm not feeling that.   I'm not feeling that. I'm not, I don't like it, bro. I'm not. Do you guys think he was feeling it or not? I don't know. Yes, that's just like a seven, that's a seven out of 10 as a meme could ever get in my opinion. Okay, here we have a meme sent from glasses, Thero, Hunzee, free VC, agent zero.   Yeah, I did say something to that nature. In my last video, which is gonna be linked at a card at the end of this video. So if you guys missed that, you go ahead, go watch that for sure, for sure, for sure, for sure, for sure, for sure, for sure. Send agent to the ward. I don't know what's wrong with me. Pick this agent, at least to set, hey, tell me what to rate some. You don't have that kind of authority. And we know that, so don't do that. The entire 2K community, when Ronnie lies about new parks in 2K 21. Cause we know what's gonna happen. Hey, that's a solid eight out of 10. Hey, y'all been coming with the funny, man. I said, give me your funniest. And y'all said, I, so I appreciate that cause this could have went way worse if y'all just sent bad memes. So far, so good. I even got an 11 out of 10 today. I'm very happy and excited about that. 2K's response when we suggest game ideas. Okay. That's how it goes, man. It goes like, all right, your feedback has been passed on. And then the person who it's passed on to, that's who says this, but not to anybody in specific, to themselves, and maybe to the rest of the people in the conference table when they're joking about how horrible our idea, y'all remember when, y'all bro, pause.  What? So that's, this is so accurate right here. But I feel like it's missing some funny. Why do I feel like that? I'm not sure. I'm not sure why I feel like that, but because I feel like that, I can't help but give it a three out of 10. All right. Here we have a video sent by Ron. Is that a, is that a fatality I need to know about in the new Mortal Kombat they're coming out with? That's that, that's that June DLC, huh? Mortal Kombat's coming out with that June DLC. 2K confronting LD2K about making them look bad for being the only one doing his job. Upris, um, listen, I was looking at your numbers.  Yeah, I guess. I don't know why I found that funny because it's so generic, but is it because it's dashy? Is that why this is funny to me? If this was anybody else, would this be funny? I'm asking very good questions here. It's just coming from an authorized meme review. You gotta ask questions. That's how you learn in life. I just like dropped these tidbits of knowledge about life just throughout meme videos for you guys, man. You know what I'm saying? And what we learned today in this meme video, watch more dashy XP videos. Obviously. Parents after you make a valid point in an argument. What are you talking about? You don't know what you're talking about right now. My mom always just tell me like, oh, you always gotta win an argument. Everybody when Davis, ah, man, why are we violating Davis today? That wasn't even in the agenda. He just came up with that yourself, huh? Now you smell it. You smell it? I smell cat. Guys. It's like he was a little bit unsure at the end, right guys? Is that, we smelled that together, correct? Ah, man. Funny cause it's violating Davis and anything violating Davis is automatically funny. That's a seven out of 10. Agent to Davis in every A&P video. Oh, by the way, we just dropped A&P slam dunk contest. Yo, bro, when you see the dunk that I did, in fact, most of you already seen it, but for those who haven't, link is in the description.  You have zero talent. You have zero talent, bro.  You are untalented, man. You are untalented, man. You are untalented. He's right, he's right. So I feel like, I feel like hopping on the mic and saying that to some people from time to time on 2K as well. But it's never worked my breath. Hey, fight, thanks for spreading the gospel, man. Thanks for spreading the word. As it relates to the meme, Agent to Davis in every A&P, true, it's true. Is it funny? And yo, for that reason, man, can't help but give you a cool four out of 10. Hey, yo, my man, I got next. And here we have Lowe, very lonely at a bench. This was at the A&P slam dunk contest video. That's just kind of funny.  You know what I'm saying?  This is an interesting meme, though.  If I had to say so, because I'm an authorized meme reviewer and sometimes I'm obligated by law to say so, it's a four out of 10. Rodney 2K, after getting away with lying and still managing to boost the game's sales. Yo, y'all doubted me.  Guess what? That worked like a nine to five. Y'all see what I'm doing with that? Okay, I know it's because it's, I know it's because it's dashing. That's the only reason why I'm laughing at these. I swear to God, yo. I swear to God, that's an eight out of 10, man. No, if ants, what's about to butt's about it, man. There's a, okay, all right, here we go. Three months into quarantine. Okay, I can't relate.  I don't know why, but in Atlanta, it almost does not feel like there's anything going on in the world. People are just out, so it does not feel anything like quarantine to me. You know what I'm saying? So because I, the Raider in question, did not find this meme exactly right here itty bitty relatable, I'm gonna have to give you a three out of 10. When you icon pass on the twos for no reason. What purpose did my parents have having me? I have to get to the bottom of why I'm so dumb. There are literal parents with more intellect than I have. In all the years of me playing 2K, and in all the videos of me rating memes, you would think that we've been through every 2K meme imaginable. But ladies and gentlemen, people like to tranquil prodigy on Twitter helped me realize that no, no, no, no, no, no, no, no, we just have to get more creative.  It's so accurate and so funny that for the first time in the history of this show, I'm gonna have to give a meme a 12 out of 10. Hey, send more like that. That was good. Send more. I want more. Me when A&P missed a Monday. Are you okay, man? Back to 2 like that. Oh my God. Hey, man. I have to interrupt every video. So here I am interrupting and he looks very, very disappointed and this is his face very, very disappointed. And I am absolutely not, but y'all can follow my Instagram and I'm gone. Yeah. We had some issues with YouTube. Our whole channel got demonetized, but now it's back. Everything is solid. Who raw? So yeah, we just uploaded a video on Monday. So we're back though. We're never gonna let you down like that again. I promise. Unless we do, you know, things happen. Oh man. I already tell what this is going guys. We prepared to lose at least two to three brain cells, on average.  What? What? What the f***? Throw some pancakes. Spray on the can, dumbass. What? It was just like, what pancakes can have faces, guys, since when? I didn't know that. When Davis says he's a good driver, and here's everybody in the A&P Last to Drown video, or Last to Not Drown, I guess, because if we all drown, we wouldn't be here continuing to make videos. Right? I think. Unless we could. I'm not thinking about it. We might be able to underwater. We would just need a lot. It would take a lot of extra components. Let's not get into that, huh? Uh, to me, myself, I don't know, this is actually a very funny photo, but the caption is not strong, you know what I'm saying? Like, the caption could be way strong. You could put this on a whole lot of different, but you didn't come with it for some reason, man. I'm just a little bit disappointed that you had this creative-ass screenshot, but you didn't match it with a creative-ass caption, man. That's a cool little two and a half out of ten. LeBron going into Brani's room to check the Wi-Fi. So I hear you're streaming now, Brani. We have two internet connections in the house, right? And I'm just a measly YouTuber. LeBron probably has, like, 17 to 35 different internet connections. Just in case half of them get murked by the weather, then he still has his own internet. He probably paid, he probably has 16 5G towers surrounding the entirety of his 50,000 square foot mansion, in which him and all of his colleagues probably have six rooms to themselves to separate all their belongings. And oh, do they have a lot of belongings, ladies and gentlemen. Okay, let me stop. I don't know where this is going. Uh, hey guys, um, this video is over now. You guys can watch more videos on the screen, podcast link in the description, A&P Slam Dunk Contest in the description, new channel in the description. Um, and all my self-esteem is in the description. So I need you guys to subscribe.


Welcome to part 1 of lecture series on machine independent optimization. So, in these lectures we are going to discuss the various optimizations on intermediate code. So, we will begin with you know an introduction of what is code optimizations, some illustrations of the different optimizations that are carried out by most compilers. And then we will have to consider a technique called data flow analysis, which is necessary to perform code optimizations. So, we are going to look at those as well. And then the fundamentals of control flow analysis are essential for everybody to know, because they help us in defining what exactly is a loop structure in control flow graphs. And then we will apply these principles to two of the important machine independent optimizations to understand how they are carried out and what the algorithms are. So, finally, we will discuss in detail the static single assignment form and the various optimizations on these static single assignment forms. So, when we consider machine independent code optimization, first of all we should understand why exactly this optimization becomes necessary. The most important reason for this is the inefficiency which is introduced by the intermediate code generation process. So, as you would have you know learnt in the lectures on machine independent you know rather the machine independent code generation or intermediate code generation as it is called. You would have observed that every time we want to make an assignment we invariably end up generating a copy of the variable involved. So, because you know the compiler takes an easy way out it simply uses generates a new copy of a variable whenever necessary and it knows that the optimization phase actually is going to get rid of it. So, extra copies of variables and then we store constants in variables and then use the variables instead of using the constants over and over again, because that is easier for us. Then there are many expressions which actually will be evaluated again and again either because the programmer has not observed them which is actually not the major reason, but mostly because the compiler has introduced extra intermediate evaluations as will become clear very soon. This code optimization as I said removes such inefficiencies and improves code. So, whenever there are extra copies it gets rid of those whenever there is repeated evaluation of expression it gets rid of these things repeated evaluations and whenever it is possible to use a constant instead of a variable it does so. So, whenever the code optimization you know is applied it can be the optimization can be in time space or power domain. So, far whatever I mentioned you know the removing extra copies etcetera etcetera they basically improve time and space, but a new dimension to the problem would be added if we want to you know save power which is very important in embedded systems. So, reducing power consumption in code is not so trivial we need models of the power consumption of the device and so on and so forth. So, they are not really topics for discussion in this lecture. Code optimization algorithms often change the structure of the programs sometimes beyond recognition as well for example, they may inline functions. So, inlining of functions that means the function call will be replaced by the body of the function with appropriate replacements to the parameters the temporary variables etcetera etcetera. So, if this happens then the original call to the function gets deleted it is replaced by the body of the function itself. And then it is possible to apply what is known as loop unrolling. So, when a loop is unrolled obviously, say twice thrice four times etcetera the number of iterations of the unrolled loop will be smaller lesser than the original. So, again the loop will not be iterating you know in the for the same number of times as the original then the induction variable elimination it actually removes some of the programmer defined variables. So, for example, if there is a loop which is controlled by a variable i it is possible that the induction variable elimination process removes the variable i and uses a different variable already present in the program for controlling the loop. So, again this the such transformations make it very difficult for the debugger to be used along with optimized programs. So, you know if we want to insert a break point at a function call there is no function right. If we want to you know look at the value of a variable which has already been eliminated then it does not work out at all. So, therefore, the usually compilers you know stop most of the optimizations if the user request that the debugger be turned on. So, when the debugger is on the program that we are debugging is usually unoptimized program. So, code optimization really consists of a bunch of heuristics and the percentage of improvement depends on the program sometimes it may be 0 as well. So, for example, if there is just a couple of there are a few assignment statements and there is no way you can change any of that by any optimization then the improvement would be 0. So, in such a case it does not mean that the optimization phase has been is generally ineffective, but it is just that for that program the improvement cannot be made. Here are some of the common machine independent optimizations that are used in compilers. So, I am going to give you an example of each of these there is what is known as global common sub expression elimination. So, repeated evaluation of expressions is removed by this process. Then there is the process of copy propagation. So, if we have many copies of the same variable you know then we can retain just one of them and eliminate there. Constant propagation and constant folding it tries to you know promote the use of the constant instead of the variable and it also tries to simplify expressions involving only constants. And thereby you know promote the use of constants instead of variables. Loop invariant code motion it removes code which is inside a loop and is not going to change because of the iterations of the loop. So, such code is called loop invariant code and sometimes such code can be removed from the loop and it can be placed outside the loop. Induction variable elimination and strength reduction this typically involves removing one or two variables and you know which are involved in iteration and then replace these and try to control the loop using the rest of the variables in the program. Strength reduction tries to you know replace expensive operations such as multiplication and division by addition or shift and so on and so forth. Partial redundancy elimination is a bit difficult to explain without an example. So, I will defer the explanation to the time at which we discussed the example. Loop unrolling is something I already mentioned we unroll the loop many times function inlining also has been mentioned. So, we replace the function call by its body tail recursion removal implies that a recursive function call at the end of a function you know a loop can be rather not a loop a recursive call at the end of a function can be possibly replaced by a loop. Vectorization and concurrentization or transformations which are useful to make the program work on vector computers or multi processors and so on. So, loop interchange and loop blocking operations help in the process of vectorization and concurrentization. So, we are going to use this bubble sort program which is quite simple as a running example. So, this is the standard bubble sort program it sorts the array a with 100 elements. So, and the a like in C runs from 0 to 99 and we assume that there is no special jump out of it if the array is already sorted. So, we definitely go through all the iterations even if it is not exactly necessary. So, it is a standard program with equal to 100 and then there is a j loop then there is a comparison there is a swap and so on. So, let us look at the intermediate code for this particular program. So, here is the you know condition for the i loop right and then here is the condition for the j loop. So, if the i loop has to terminate it comes out here and if the j loop has to terminate it comes out here and then goes back to increment the i. If the i loop does not terminate it goes into the j loop and then the j loop actually works you know in this sort of a thing. So, in all these. So, here we have actually the comparison and you know rather the swap operation this is just the comparison is right here. So, you can see that we have one element of the a another element of a and then there is a comparison. So, if we need to swap we come to this block here is the swap operation. So, even though there were only three statements in the swap block the code generated is quite long. So, let me explain why this happens. So, when we want to do a swap the first thing is we want to do temp equal to a j then a j plus 1 equal to a j and then a j equal to 10 right. So, here is the this is the sequence of operations three operations which are required for the first assignment statement temp equal to a of j. So, assuming that each integer requires 4 bytes the increment on the array which is in terms of bytes is going to be by 4. So, we need to multiply the j index by 4 then we get the element from the array and we assign it to temp. So, this is the sequence of three operations for just that temp equal to a of j then we have the other one a j plus 1 equal to a j. So, here again we compute 4 star j. So, you can now observe the repetition of the computation 4 star j here and 4 star j here as well then you know we take the address of the j plus j th element rather j plus first element and then yeah this is j th element. So, t 14 is j plus 1 t 15 is 4 star t 14 and then t 16 takes the element of a right. So, now star of t 13 equal to t 16 this is the assignment of you know a j plus 1 equal to a j. So, then the last one is the a j equal to temp operation here right. So, if you observe all this block and this block together we have a 4 star j here and then we have 4 star j here and here as well. And then we have j plus 1 computed here and then we have j plus 1 computed here and here and here as well. So, in other words we have i minus 1 here and i minus 1 here. So, there are many places where the same computation is being repeated. So, in such a case we will be able to perform many of the optimizations. So, we are going to look at those. So, let me explain the first optimization global common sub expression elimination. So, this says consider a situation where there is a computation of some expression y plus z in this block right and every path preceding that block has a computation of y plus z. Of course, it is obvious that y and z should not change along these paths. So, this y plus z, this y plus z and this y plus z will have identical values and there is no need to compute this y plus z all over again. We might as well say put that y plus z computation in a temporary the same temporary along all paths u u u and then just say x equal to u. So, in this fashion whenever we it does not matter which path we take we are going to compute the y plus z expression only once it will not be computed twice as in this particular case it will be computed only once. So, this is the other part of the example which shows the need for repeated application of G C S E. So, here we have x plus y and x plus y. So, we get rid of the repeated computation by introducing the temporary u and assigning C equal to u here, but once we perform what is known as a copy operation copy propagation. So, for example, observe here that this is a equal to u and it is really a copy of u. So, we can replace this a by this u directly and get rid of this particular assignments or copy operation. The same is true here could actually replace this C in the equal to C star z by u and get rid of this statement. If we do that we have u equal to x plus y and b equal to u star z and here we have d equal to u star z. So, because of the copy propagation we have discovered another instance of you know common sub expression here one here and one here two instances and we can apply G C S E again to get rid of this repeated computation. So, we have v equal to u star z and d equal to v. So, the moral of this example is that you require many applications of common sub expression elimination and copy propagation in order to eliminate most of the common sub expressions which would otherwise be hidden. So, in general optimizer supply the optimizations many times in an iterative mode. So, until not much improvement is possible or you know a definite number of times have actually taken place. So, let us see how it works on our running example. So, I have marked in color the various common sub expressions i minus 1 then here is 4 star j then we have j plus 1 in many places. So, if we eliminate these we get this program. So, we have you know t 2 equal to i minus 1. So, here instead of t 21 equal to i minus 1 we have t 21 equal to this t 2 we have t 4 equal to 4 star j. So, wherever there was 4 star j we replaced it by t 4 see and then wherever we had j plus 1 you know we replaced it by t 6. So, here is t 6 and here is t 6 and so on. Now, this has given rise to many copies. So, here is t 21 equal to t 2 and i equal to t 21. Obviously, we can make this i equal to t 2 and so on. So, we do that here is i equal to t 2 then in this case you know we in the previous case for example, t 11 equal to a of t 10 could have been made t 11 equal to a of t 4. So, similarly this t 12 equal to t 4 could have been eliminated and we could have made this t 13 equal to a plus you know t 4 right. So, if we do such optimizations if we do such optimizations the copy propagation we get this code. So, we have a t 4 then a plus t 4 right and similarly this j equal to t 6. So, the copy propagation example rather optimization when applied removes many of these copies, but then there is an opportunity for further optimization now you know. See for example, the expression 4 star t 6 right now becomes a common sub expression. So, here is 4 star t 6 and again 4 star t 6. So, we can eliminate that as well and then perform another round of copy propagation. So, here if we had said t 5 equal to t 7 then t 15 equal to t 7 then we could have replaced this t 15 by t 7 right and similarly this t 18 could have been replaced by t 7. So, that is what is done here right. So, after round of GCSE and copy propagation we get this short piece of code in which there are many instructions which have been eliminated. The point is even in such a simple program such as bubble sort there seems to be an opportunity to perform GCSE and copy propagation several times. So, if this is so in a simple program I am you know there is certainly there are many chances to perform these optimizations in larger programs. So, let us consider an example to understand how constant propagation and folding take place. So, here is a program we have a equal to 10 b equal to 20 if b is 20 go to b 3 you know yes no. So, if it is yes then we assign a equal to 30 then d equal to a plus 5 and stop. So, it is very clear that since b is a constant 20 this evaluation of 20 equal to 20 can be carried out by the compiler itself. So, that is basically you know propagating this constant value of b to this particular use and then evaluating this equality amounts to constant folding. So, if this becomes true and therefore, the code for the you know the rather the edge for the no part can be removed from the control flow graph. So, we will have only one edge here. So, this becomes a equal to 30 and here we have only these two instructions because this has already been you know evaluated. Here it is very clear that the value of a can only be 30 because this edge does not exist anymore. So, we can evaluate the constant 30 plus 5 as 35. So, this is also another example of constant folding. So, the program because of constant propagation and folding has become quite simple. So, let us move on to the next example of loop invariant code motion. So, here is a very simple loop. So, we look at the two statements in red one says t 3 equal to address of a the other says t 4 equal to t 3 minus 4. So, consider just one statement t 3 equal to address of a address of a is a constant it is nothing but the you know offset of the array a inside the activation record. So, this would be you know this a statement which does not change its value during the iterations of this particular loop. So, it is obvious that this statement can be moved outside the loop like this, but then the next statement t 4 equal to t 3 minus 4 depends only on this statement which is loop invariant. So, therefore, in turn this statement also becomes loop invariant it does not change its value during the iterations of the loop and even that can be moved outside the loop. But remember you must move these statements in the same order as they are present in this loop they cannot be swapped otherwise the program may be incorrect. So, this is what is known as loop invariant code motion in this particular example there is only one basic block one thread of control. So, moving code outside is was a very simple operation, but as you will see in the later parts of the lecture there are many conditions that need to be satisfied in order to move the loop invariant code to outside the loop. Next example is strength reduction. So, here is a multiplication 4 star i suppose the processor is a very simple processor say in the embedded system domain and it does not even support a multiplication of integers forget floating point. In such a case usually the software implements multiplication if it is essential by a sub routine which is very expensive to be called. So, in such cases you know we may want to replace this 4 star i by a repeated addition process right. So, 4 star i t 5 equal to 4 star i you know as i increments will take the value 4, a 12 etcetera. So, we might as well add 4 to it and get the new value of t 5. So, that is precisely what we intend to do here, but we replace t 5 you know by a new variable called t 7. So, t 7 equal and then we have t 6 equal to t 4 plus t 7 and we have t 7 equal to t 7 plus 4 which is placed immediately after i equal to i plus 1. So, that we do not forget to compute the value of t 7 which is required for this iteration. So, now t 7 increments in force and it is applied to t 6 exactly the way t 5 was being supplied to this particular assignment. So, the semantics of the program does not change and we have actually the there are two steps in this replacement we would have first set t 5 equal to t 7 and then then a copy propagation to remove t 5 in this case in this example and make it t 7. So, that is a two step process we move on to the next optimization called as the induction variable elimination. So, usually the induction variables are variables which are used to control a loop. So, even here for example, we say check i greater than 100 and then increment i if it is not right. So, this is the loop control and i is used for that purpose. So, suppose you know you look at the program a little more closely you find that there is another variable t 7 which is also being incremented in tandem with i right. So, this is the variable which introduced in the previous example with you know the strength reduction process. So, as we increment i t 7 also monotonically increases by increment is 4. So, if we actually want to get rid of a variable it is possible to you know get rid of i and then use t 7 in its place with the appropriate change in the operands of the expression. So, we have used i here and we have actually computed i here. So, we replace this by t 7 greater than 400 because as i increases from 1 onwards 1 2 3 4 etcetera because the increment is by 1 t 7 starts with the value 4 and increments by 4. So, a 12 and so on and so forth. So, whenever we compare i greater than 100 we need to compare t 7 with 400 and now once we replace that the variable i with t 7 and then the operands are changed appropriately there is no need to retain this variable and its associated statements. So, we remove it and now the program becomes smaller. So, this is what is known as induction variable elimination. So, we could you know remove i and replace it with t 7 of course, if you observe carefully it is also possible to get rid of a variable to you know remove t 7 itself and replace it with appropriate values of i, but that would defeat the purpose of the you know strength reduction that we perform. So, we will be undoing strength reduction if we replace t 7 with a usage of i. So, that is not intended. Now, we move on to partial redundancy elimination a common global common sub expression elimination G C S E as it is called is actually a can be termed as a total redundancy elimination transformation. So, if you recall the example we must have in order to remove this a plus in order to remove this a plus b we must have a computation of a plus b along every path that reaches this basic block.  So, we cannot apply the global common sub expression elimination process here, because the expression a plus b is not available along this path it is available only along this path. So, this particular example a plus b is said to be partially redundant it is not totally redundant it is actually available along this path, but it is not available along this path. In such a case sometimes it is possibly cheaper to insert a computation of a plus b in this edge. So, we have dissected this a plus this edge introduced a new block and put a computation h equal to a plus b here. And for this x equal to a plus b we have replaced it with h equal to a plus b and x equal to h. So, the semantics of the program remains the same. So, now consider the expression a plus b. So, a plus b is now available along this path at the entry of this block a plus b is available along this path at the entry of this particular block. So, we can perform ordinary common sub expression elimination and instead of this y equal to a plus b we can replace it by y equal to h. So, this is the essence of partial redundancy elimination. There are many difficulties here. First of all we need to make sure that this a plus b is partially redundant and there are a couple of conditions to be checked there. And then we need to find the arc which is the best for the introduction of the extra computation that we have shown here. So, you know if we introduce it here it is worse you know we would have computed it twice right and this is the computation you are going to remove but you have not gained anything. So, we are introducing it here which is the best but as you easily can imagine there this program may actually grow in this direction and there may be many way paths. So, which path of this program should be taken and which arc of the program should be cut in order to introduce the computation of a plus b that is a difficult question. So, that is another there are a couple of conditions that we need to check in order to make sure that we introduce a plus b in the best possible place. Then unrolling a for loop. So, here is the for loop for i equal to 0 and then we i less than n i plus plus then some statement s 1 which for you know the indication here is that s 1 for the value of i. So, this is the instance which is relevant for the iteration i and this is the instance of s 2 which is relevant for the iteration of i. So, the reason why we mention it like this is if the code has you know use the value of i then when we perform loop unrolling we may have to replace it with the appropriate value of i plus 1 or i plus 2 etcetera. So, the what we have shown here is an instance of s 1 with the value of i. So, when we write a s 1 of i plus 1 we imply that it is an instance of s 1 with the i being replaced by i plus 1 and here the i has been replaced by i plus 2. So, we can unroll the slope.  So, s 1 of i plus 2 and s 2 of i plus 2 they correspond to the iteration number i plus 2. So, there are three instances of the body of the for loop here. So, it is very obvious that this loop must operate only one third the number of times that the original loop operates. So, if the original loop operated you know some n number of times then we need to perform the once we perform the unrolling we make sure that the check i less than n is changed to i plus the i plus 3 less than n and we also make sure that the increment by 1 is now increased to 3 and there are three instances of the body of the loop, but it is also possible that the number of iterations is not exactly you know divisible by 3. So, in such a case there would be a few iterations which remain right. So, for that there is a small sequential loop which would operate once or twice or maximum of three times and. So, for example, here if we have i equal to you know if this is supposed to run only three times. So, i less than 3 then this part in you cannot even unroll it. So, we will have to execute it in a sequential mode. So, this test would fail 0 plus 3 less than 3 would fail. So, this part will not even be executed. So, we will have to execute it here the same is true if the number is 4 or 5 right. So, in that case we need to we will be left with 1 or 2 iterations which need to be executed. So, this is the condition k less than n k plus plus and we start with the iteration number i with which we ended this particular loop. So, why should we do loop unrolling? There are many reasons for this the first one is the first one is in instruction scheduling we actually need a large basic block. So, that the parallelism in the basic block can be you know used by the instruction scheduler to its advantage. So, if we have a very small basic block with 5 or 10 instructions instruction schedulers do not work very well. So, they work very well if there is at least there are at least 50 or 100 instructions. So, in such a case unrolling a large loop by 10 or 20 times yields large basic blocks and therefore, instruction scheduling becomes a very efficient process. The second one is by increasing the decreasing the number of iterations the overheads of the jump they actually reduce. So, as you realize every jump instruction kind of creates a problem for the pipelines. So, we must reduce the number of jump instructions as far as possible. So, if we reduce the number of iterations of the loop the number of jump instructions will automatically executed will automatically come down. So, that is another reason why we may want to unroll a loop. So, here are two examples of unrolling a while loop and unrolling a repeat until loop. So, while see s 1 s 2 can be unrolled as while see then s 1 s 2 and once we have executed we need to check whether the condition holds or not. So, if not see break again s 1 s 2 if not see break again s 1 s 2. So, this is the unrolling pattern for the while loop the repeat until is very similar. So, we do repeat s 1 s 2 if see then break because we need to iterate until see is true then s 1 s 2 if see then break s 1 s 2 until see. So, again the number of times we we have unrolled twice here. So, there are three instances of the loop body the number of times the loop would iterate will be one third approximately to compare to the original. The next optimization is function inlining. So, take a simple function definition into find greater which tries to find the largest number in the array a. So, here is a parameter a size 10 and then the number you know n. So, here. So, here is a loop which goes on from 0 to 9 and if the if this particular array contains an element which is greater than n then it returns the index of that element otherwise it increments the loop and not the greatest of the array, but an element greater than this element n and then it iterates until it finds it otherwise you know the loop terminates in comes out. So, if there is a call x equal to find greater y comma 250 by inlining this particular function we need to introduce new variables for the local variables of this particular function. So, we let us call them new i and new of a 10. So, this is the parameter. So, the new a now is assigned the value y which is the formal parameter because this is a call by value we have to make a copy and in the loop we use the instead of i which is supposed to be new i here we just use it with the same conditions new i equal to 0 new i less than 10 new i plus plus and we compare new a of new i instead of comparing a of i because now this is a copy greater than 250 then x equal to new i and go to exit. So, return here actually is replaced by x equal to new i where x is the variable on this left hand side this accumulates the return value and then we could have had a break as well. So, we exit the loop. So, this is the inlining of functions what do we gain by inlining functions. So, when we inline a function the most important thing is there is no subroutine call instruction necessary subroutine jump instructions are subroutine call instructions are very expensive because they imply creation of a an activation record then pushing parameters into that activation record and then getting the result from the activation record and finally, destroying the activation record and whenever we want to access a variable on the activation record there is a bit of you know cost attached to it. So, if you inline the function creation of the activation record etcetera destruction pushing parameters they all they are all not there at all. So, it is much cheaper and the code runs in a much faster way compared to the un inlined call. So, inlining introduces efficiency into the program by eliminating a number of subroutine calls. The next optimization is the tail recursion removal. So, let us understand what exactly is tail recursion here is a simple function called sum which takes an integer array as one of the parameters a number n as the second parameter and a pointer to an integer x as the third parameter. So, if this says if n equal to 0 then add the 0 th element of a to star x. So, star x equal to star x plus a of 0. So, the sum is being accumulated in star x otherwise add the n th element and call some recursively with n reduced, but x remains the same. So, this recursive call is the last statement in this particular function. So, in other words it is at the tail of the function that is why this is called as a tail recursive call. So, in such cases with appropriate checks it is possible to remove this tail recursion and replace it with the while loop. So, the same function declaration remains the same and you know instead of a recursion we have a while true loop which runs forever, but there is a break inside which make sure that we get out of the loop. If n equal to 0 then star x plus a of 0 which remains as it is and then instead of you know returning from the function we have a break which goes out and then of the loop and then terminates the function. Otherwise if n is not 0 we had a recursive call here we have the same sum and then we reduce the value of n by 1 and then continue with the loop. So, this loop executes as many times as the number of values you know as the variable n. So, once n reaches 0 it breaks the loop. So, we have successfully replaced this tail recursion by a while loop and the number of times this while loop operates is the same as the number of times this recursion happens. Whereas, this while loop is very efficient compared to you know this particular recursive call. So, recursion as I said is much more expensive because we need to set up an activation record push parameters extract the result and finally, destroy the activation record. So, all that gets eliminated in this process we move on to vectorization and concurrentization. So, take a simple loop x i equal to x i plus y i where the loop iterates from 1 to 100. So, because we are only extracting the old values of x and y and then summing it up and putting it into the array again we can actually execute all these statements with the help of a vector processor. So, here is a vector 1 to 100 which whose value is extracted first another vector 1 to 100 whose value is extracted next they are added the corresponding elements are added and assigned to the vector x again. So, this is very easy to see because there are no dependences there are no usages of the value which is computed within the loop I will give you an example where such vectorization is not possible. Thus if the processor were to be a multi core processor we could actually start a thread for each one of the iterations of this loop and each thread would do this summation. So, that is indicated by for all i equal to 1 to 100 x i equal to x i plus y i. So, we start 100 threads each thread doing x i equal to x i plus y i for a particular value of i. So, that is the way it would operate on a multi core processor and these are called vectorization and concurrentization. So, here if you look at this example the statement says x i plus 1 equal to x i plus y i look at the expanded version x 2 equal to x 1 plus y 1 x 3 equal to x 2 plus y 2 x 4 equal to x 3 plus y 3 and so on. So, x 2 is computed here used in the next iteration x 3 is computed here and used in the next iteration and so on and so forth. So, because of this dependence of the value on the previous iteration the code cannot be either vectorized or concurrentized. So, emitting such code even though syntactically it looks correct would be wrong. We are not trying to reuse the rather use the computed value of x, but we are just using the old values of x here. So, this is a this is incorrect. In certain cases it is possible that the outer loop can be converted to a parallel loop cannot be converted to a parallel loop and the inner loop can be converted to a parallel loop. The problem is inner loop it rates certain number of times which may be too small for giving sufficient work to you know if you parallelize the inner loop then the work involved just one statement may be too small for each thread. So, in such cases sometimes we are allowed to do what is known as a loop interchange. So, the j loop goes outside and i loop comes inside. If you are allowed to do this then the j loop can be operated in parallel and the i loop with this assignment statement operates in a sequential mode. So, for each thread which is created for j there is a whole loop which executes which is sufficient work for the thread. So, the code generated would be something like this. So, this is the loop interchange for parallelizability which is beneficial in certain cases. When we have a fixed amount of a cache and we know the cache size it is also possible to actually do what is known as loop blocking assuming that the cache size is 64 the block size is 64. We actually break the i loop into iterations with an increment of 64 the same is done for the j loop we break it with an increment of 64 and inside we actually iterate from 1 to 64. If we do this every time we finish one iteration of this we are going to get a block of 64 into the cache memory and then these two you know loops actually work only on the elements of the cache. So, if this is the case then the program becomes much faster. So, loop blocking also is very beneficial when we have cache memory. Now, we move on to the fundamentals of data flow analysis. So, data flow analysis basically is a bunch of technique that derive information about the flow of data along the program execution paths. So, essentially we look at the execution path in a program from point p 1 to p n. So, we consider the point just before the statement and just after the statement. So, if you look at p 2 p 1 is a point just before the statement and then p 3 would be a point just after the statement. So, this is how p i is a point immediately preceding a statement and p i plus 1 is the point immediately following the statement and of course, we could reach the end of the block. So, in such a case p i is the end of some block and p i plus 1 is the beginning of the successor block. So, we are essentially looking at the paths in the control flow graph. So, and in general there is an infinite number of paths through a program and there is no bound on the length of a path either. So, this is true because if we have a loop then we do not know the number of times it iterates. So, there could be very large number of paths. Basically, data flow analysis or program analysis summarizes the program states that can occur at a point with a finite set of facts. So, even though there are a huge number of paths to a particular program, we want the summary of the information coming along all these paths and put that into that particular state. So, the analysis is certainly not a perfect representation because we are summarizing the effect of many paths into that particular point. So, data flow analysis aims to produce such summaries of information. So, what these are will become clear later, but the applications of such program analysis techniques are in program debugging where we want to ask questions such as which are the definitions that reach a point and these are all useful in optimization such as constant folding, copy propagation, CSE and so on. So, data flow value for a program represents an abstraction of the set of all possible program states that can be observed for that point. So, for reaching definitions this could be the set of all definitions that reach a point. You know the set of all data flow values is the domain of that application. So, we are going to look at the reaching definitions problem where the domain is the set of all subsets of definitions of the program. For available expressions we would consider expressions and set of all subsets of expressions as the domain and so on and so forth. A particular data flow value is a set of definitions. In general all the data flow problems involve equations with in and out and where S is a statement. So, we want to find a solution to the set of constraints that are imposed on in and out and then say given these constraints these are the values of in and out. We want to do this for all the statements and that would be considered as a solution to the data flow analysis problem. So, we will stop here and then continue with this lecture in the next part. Thank you.


I'm pretty darn excited to be able to bring you five different makeup cases that I have been trying out and figuring out whether or not they are ones that you guys would love as well and I think that the five that I've narrowed it down to they have great organization, they have great ways to store your makeup when you're traveling or if you just want to put it in a makeup bag like I do because of my disability I do sit on my bed and I do my makeup while I'm in bed so having it all together in one place is what I need very much and we're going to talk about five different ones. Most of these you can get on Amazon and I didn't check but I think that the fifth one you might even be able to get on Amazon so let's get into five gorgeous makeup bags and let's do that right now.  Now saying that I have a huge makeup train case you could put all of your makeup and your skincare in here I just have makeup in here this one is a big one this one does come in a medium and it might even come in a smaller one as well you can always look around after you click on this one you can look around and see if there's one that might fit you better but this one's a big one this one has two compartments one at the top and then the other one down here where you can keep your the majority of your makeup but let me just show you the organization in this one. This is probably the biggest one that I've seen I really love this one this one is probably my favorite out of all of them just because I can put so much into this I mean I put a lot in here let's open up the top and in the top as you can see I have a lot of different things now this could be used to hold any liquid bottles you wanted I just put in a lot of my compacts because it holds them really steady in there and I really like that and then as you can see it also has a great pocket area too has a place where you can put more brushes if you want to I put liners in there and then it has a secure compartment where I put my odds and ends I put a sharpener some scissors some eye tape a cleaner in here cleaner rag in here some um corrector concealer my eye primer all kinds of that so that goes in that part and that is a lot of storage there and then opening up the main part right here you have a ton more storage for brushes or for eyeliners or whatever you want and it's got the plastic across it the plastic flap that goes across it so that you can keep those cleaner or away from your other makeup which I think is great too and then in here you have the same thing as before you can rearrange these it does come with a few more but I like the way that I did this it just seemed to help keep everything okay and you can fit so much in here as a matter of fact there's an Natasha Denona eyeshadow palette in here and there's a lot of other eyeshadow palettes in here which I love because you can't do that in other ones and oh by the way up here in the pocket behind the brushes there's a big palette that I have from Colourpop in there as well and it holds all of my primers my sprays a ton of different foundations and I liked that because you know when you do foundations they're a little bit longer and I wasn't able to put those so easily into other ones but being able to customize this is so good the outer part of these you can wash with a soap and rag this one is quilted so you can easily find a way to wash these up if they get dirty on you and then the second one that I have is this one and this one you can't get the actual colors of this anymore because my husband bought this for me a couple of years ago but you can still get this this is by Triforce and this is a definite love for me when you go on an airplane or when you know that your makeup is going to get kind of jostled about it has a hard shell case and I think that's great about it and it also has on this side it has this little band where you can hook it onto your other luggage as you're rolling your other luggage around in the airport or traveling whatever it has two sides and then each of those sides opens up and it does have velcro so you can lay it flat now let me show you the organization inside of this one the pattern isn't available anymore the Triforce has different patterns they go through different things this was bought about three years ago but it is a hard case which I really like and again it does come with the strap that you can use there I just have always used it as a tote and then on the back you have again that strap that will hold onto other luggage so that you can not worry about having to carry it separate so let's open this up and see what we have on the insides on the inside you can see that there is a lot of storage in there now this does have velcro tabs that you can undo really easily and it will lay flat which I think is really good too you have all kinds of mesh pockets right here you have a full zipper pocket that I put a bunch of um usually I put my eyeshadow palettes in there but down here on this side I put away a lot of different things if you have sponges it's a great place to put those because you have the mesh right there as well so this is very roomy on this side and these zippers are really really nice zippers I mean this is a very well made bag and the way that you can travel with it like that or lay it flat is a big bonus for me and the zippers on the outside are extremely good quality too I've had this for like I said for years and nothing has ever happened with any tearing or any you know fraying or anything so on the other side when we turn it around we have the same thing where you can hold it open like this and you can tell that there's a bunch of dividers in there or you can open it with the velcro on the sides and it will lay down now up here I have my foundations that are in that elastic tabs more mesh pockets over here which I just use a ton of things in and then this right here is where there was a mirror and I accidentally broke the mirror it's not really anything that I would do my makeup with anyway so it's okay and then right here you have some tabs or some elastic tabs that you can put your brushes in and then down on this side you have one big pocket right here that I put a ton of stuff in as well and you can go ahead and strap that together with the velcro if you want to too so that that's not moving so this case to me is perfect for travel because it is that hard case and if you are going to get bumped around or anything you just really have a way to protect everything and again if you stuff it full full full it doesn't matter because these zippers are very high quality and they it will you know push it all together and it will really be very durable for you I'm going to stick this one in the middle but this one I absolutely love it's not exactly a full makeup case but I think if you're like me you're going to fall in love this is just almost like it looks like an old cd case that we used to carry around with us but this is a makeup brush case look at this thing isn't it beautiful I love this this has every single eye brush that I own in it which is saying something but it's got an upper and a lower part right here where you can put them so let me get you a close up of that one as well I love that this has two different kinds of fabrics on here it has the vinyl here and then it has kind of a soft vinyl fabric here and then the rivets on it so cool I just really thought it was great but when you get inside of here it is so wonderful for carrying your brushes now this right here is a microfiber cloth that you can put your dirty brushes on this side if you want to and it helps keep your other brushes clean say if you are using cream products on one side and you wanted to keep those cream products off of your other brushes but this organizer is something that I am absolutely over the moon happy with this holds every single solitary eye brush that I have and I could not believe it when I got it because I was using the little round cups where you had to oh where's that brush I need where is it where did it go or in a drawer it just makes it so much easier to be able to use these they can be separated into brand you can be separated into kind whatever you want to do they're there this has a very easy cleanup because it can be washed with a rag with a little soap and water so nice now the other thing you can do and I will show you how that works is you can fold this backwards and then there are tabs here and there's tabs here and you clamp those together and you can do that on both sides you clamp those together and then you have it so that it will stand up and you could put this on your vanity if you're you know traveling how easy is that to have it right in front of your makeup so great this is one of those finds of the year for me I was so excited about it and I love that I can hold all my brushes in here I might buy another one just for my face brushes because I definitely wanted to have just my eye brushes and be able to see all of those at once and no I don't use all of these every day but it's sure nice to be able to have these where they are so easily accessible and you can have them set up right and I I'm absolutely in love with this I think it's one of the best finds I have found off of Amazon in a very long time next is this rose gold one again these are huge because I love makeup I carry around a lot of makeup I want to have my everyday makeup in just one place but this one is a little bit thinner I shouldn't say thinner because it looks huge but it's a little bit less wide or less deep than that big gray one was it also has on the back of it that the tab or the strap where you can put it over your luggage and do that it also does have this right here that you can hang on one of the door hangers if you want to and then it also has it comes with another strap that you can put on any of these to hold it more securely so again let's get a little bit close up and let's look at this one and I'll just start with what is here on the top so you can see each section as we go to begin with you have a mesh pocket right here which is really big so if you have anything that you need to keep super dry maybe you do a sponge you want to put it in here so it doesn't get onto your other makeup I have a couple of palettes in here and then I have some eyeliners in there so that's going to keep that very secure and then going up a little bit you have another flapped pocket right here that has some storage where you can secure some things I have a couple setting sprays in there and then over here is a zipper pocket that I put a full-size palette in that has that can go all the way in so you could put quite a big palette in there if you wanted to so then as I unzip the next section again it has a ton of storage now these pieces right here will come in and out and you can fit these however you want they come with more pieces than are than are here but as you can see this holds a lot and then my favorite part is all of this secure holders that you have up here that are individual and you can put brushes in here you can put eyeliners concealers whatever you need you could probably fit tons of skincare skincare in here as well I chose rose gold for this one but I do think that it comes in a couple of different colors maybe a pink and a black and then lastly I was so excited to find this one and the reason is is because for me this is an upright makeup case when I say that you don't have to lay anything down and so I absolutely adore using this for all of my skincare my skincare can all stand up and my hair care I have hair spray in here too this has several pockets so you have the front one and then you have some side ones as well the side ones almost come all the way down so they open up all the way let's get closer so you can see this one as well now most of those other ones I've had for a while but this one I am the most excited about and that's because this is what I use to do hold my skincare and the reason that I love it is because it's taller and you can keep so much of your skincare upright which I think is fantastic so you have the pouch right here that's in the middle which is quite big and all of the skincare that stands upright there's a lot of places that will hold them in place instead of them just flipping around in here so you have a lot of that hair care and skincare for me this is wonderful and then right here on the top there's a mesh bag which I keep my makeup remover cloths in there and also I love that it has a swivel hanger on there so you can hang it up over a door when you're traveling so that is there and then on both of these sides you have openings that you can put more into and it does have right here if you can see it does have the elastics that keeps so much in place they do seem to be a little bit bigger but for hair care and shampoos and that kind of thing that's great and then on the other side you have the same exact thing I love how wide it opens up so that you can see in there and you know what you have and there's three of those elastic pieces that keep everything in place there so you really can see that this is a big one that's going to hold so much and then right here this is the pouch that is in the front so you have a zipper pouch which I just keep a few little incidentals in there some cotton rounds and my balms and then also down here I keep all of the things that will hold tightly and not just be jostling around inside here my eyelash serums my eye creams my lumify brightening drops some of the ordinary so this is really handy to have so let me see if I can just pan you out a little bit and you can see how nice and big that whole entire thing is this is one of my very favorites so that's my roundup of five makeup cases that I absolutely love do I need five makeup cases no but I wanted to review five makeup cases for you guys technically it's four but it really ended up being five with the brush case and the brush case was such a fabulous find for me I was so excited about that because I usually am digging through bins or going through glasses and trying to find which one I want that's just laid out perfectly each of these is very affordable I would say the hard case one from Triforce is probably the most expensive one but to me that was worth it to have that security of that hard case on the outside so I hope that you did enjoy seeing all of these today let me know in the comment section if you're thinking about getting one of these and if one of these might fit your needs I would love to hear that from you or if you have one that you absolutely love that you couldn't be without let us all know that in the comment section too so that we can check it out thanks so much for being with me today I hope everyone is happy and healthy and doing well I love you very much let's all meet back here in my next video together and I'll see you very soon take care love you friends bye bye