Roger Federer and Novak Djokovic, who will face off for the 50th time in their storied careers when they meet in the Australian Open semifinals, have played wildly different roles this year in Melbourne.

Federer, the No. 3 seed, has specialized in thrilling feats, personified by his remarkable quarterfinal comeback win over unseeded, No. 100-ranked Tennys Sandgren. For hours on end, Federer has held the Rod Laver Arena audience in a state of tension stretched tighter than those cables on the spider cam.

Meanwhile, Djokovic has plodded along, raising the occasional eyebrow if never the roof with a series of surgically precise wins over five rivals. The No. 2 seed, Djokovic lost a set in his opener with German Jan-Lennard Struff, but no other opponent managed five games until his quarterfinal assignment. The rejuvenated Canadian bombardier Milos Raonic managed to force one tiebreaker on Djokovic while taking a straight-sets loss.

The difference in their journeys through the event presents a vivid picture of what Federer is up against in the semifinal, and it suggests that the three-way battle for recognition as the all-time male Grand Slam singles champion is entering a new, final phase. Federer still leads with 20 titles; Rafael Nadal has 19. With 16, Djokovic must make a move.

It wasn't so long ago that the string of opponents Federer faced would have triggered Nadal's fans into copious tweeting about the Swiss icon's "cupcake draw." Understandably so: The highest-ranked player Federer has faced was a highly touted prodigy who hasn't really panned out in 27-year-old No. 41-ranked Filip Krajinovic. For the first time at a major, the heavy hand of age (Federer is 38) appeared to influence the shape of his matches. At this point, various forms of frailty from loss of focus to injury intrude on his afternoons like unexpected guests.

Federer knew he was rolling the dice when he chose to marshal his resources and refrain from playing any competitive tennis to start the new year. He told reporters early in the tournament, "I just haven't played proper matches in many, many weeks, and a lot of guys, probably 95% of the guys, are coming here with matches. So I think for me, really the first three rounds are key to get going, to get used to the pressure, stay calm."

It turned out that moving his legs and retaining his signal composure hasn't been a problem for Federer. The real danger has been ragged, inconsistent play and bold, opportunistic opponents. In the third round, journeyman John Millman came close to duplicating his upset of Federer at the 2018 US Open. He built an 8-4 lead in the fifth-set tiebreaker before Federer washed over his sand castle, ripping off the final six points of the match.

Against Sandgren, Federer survived seven match points along with a groin injury and a code violation for uttering an audible obscenity before he locked down the W. Federer wore a perpetual scowl throughout that grim battle and, at times, looked flatter than the Swiss mint commemorative coin bearing his image. In his on-court postmatch interview, Federer told Jim Courier: "I think I got incredibly lucky today. I don't deserve this one, but I'm standing here and obviously I'm very, very happy."

Roger Federer advanced with a remarkable quarterfinal comeback win over Tennys Sandgren. EPA/ROB PREZIOSO

Federer's escapades have thrilled all who witnessed them. Djokovic in particular must have delighted in them. Surely they showed him a struggling, aging champion who will have no good reason to feel confident going into the semifinals. Federer sounded more hopeful than confident when he spoke about the fitness he might recoup from treatment for his groin injury, and the staggered schedule that will give him two full days to recover.

"I believe in miracles," Federer said.

That's a good thing, because it will probably take supernatural intervention to stop Djokovic at this tournament. Federer hasn't beaten Djokovic at a Grand Slam event since 2012. His one ray of hope is that he won their last meeting, at the ATP World Tour Finals in November. But that was on a faster court in a best-of-three-set format. This is different. Very different.

Before this tournament started, Djokovic waxed philosophical in a meeting with reporters, telling them: "It seems like my career was going in sequences of several years. I think every sequence had different circumstances. ... I mean, I'm a completely different person, have a completely different life today than I had five years ago."

That may be true of Djokovic's personal life, but professionally Djokovic version 2020 looks a lot like the guy who, five years ago, won the Australian Open for the fourth time in five years. He also jackhammered his way to the championship in two of the past four years, bringing his haul Down Under to seven titles. It's his most fruitful major.

Djokovic appears to be growing less vulnerable as he approaches age 33. He won one title Down Under in his first six appearances but six in his past nine tries. That includes a hiding of Nadal last year at this time. Djokovic allowed Nadal just eight games in that blowout, inflicting the Spanish star's worst loss in 27 major finals.

As if that weren't daunting enough, the atypical conditions this year at the Australian Open favor players who are experts at defense, rallying and counterpunching. Following his second-round win, Federer himself said: "It does feel sometimes like a bit of a clay court, where you can maneuver your opponent around until he's not there anymore, and you can just ... end up with a winner."

Novak Djokovic has five straight Grand Slam victories over Roger Federer. EPA/MICHAEL DODGE

Djokovic can make opponents disappear better than a wizard from a Harry Potter book. He plays superb defense and his crisp shots and punishing consistency are unparalleled.

While Federer rested and trained for his 2020 debut in Melbourne, Djokovic ripped through all comers in a six-match streak to help Serbia secure the inaugural ATP Cup title -- a run that included wins over No. 9-ranked Gael Monfils, No. 14 Denis Shapovalov, No. 5 Daniil Medvedev and No. 1 Nadal.

"It was a phenomenal couple of weeks and great lead-up to the Australian Open," Djokovic said in his pre-tournament news conference, adding, "but it did take a lot out of me."

Djokovic adjusted his training goals after the Davis Cup, and whatever had gone missing was back at full strength in Melbourne. His success this past week was predicated largely on terrific serving, a welcome change from those times not so long ago when Djokovic struggled with the shot. Credit the change to Djokovic's part-time coach Goran Ivanisevic, a serve specialist who helped Djokovic tune up his shot in the offseason.

"I'm hitting everything I can in terms of the variety of spin, slice, flat, hitting the spots, body, wide, T. I'm trying to mix it up all the time," Djokovic said. "I feel that my serve this year so far in ATP Cup and also Australian Open has been terrific. When I'm serving well, it allows me to feel more comfortable, more confident, kind of step in and play at the higher level of tennis."

The most glaring difference in their tournament stats bears out Djokovic's claim. He's won 84% of his first-serve points, third best among all players regardless of the number of matches they played. Federer didn't make the top 20 in that department.

Federer appears to be a prohibitive underdog, but Djokovic isn't taking anything for granted.

"What he did [against Sandgren] was amazing," Djokovic said. "He showed me he's one of the best players of all time. I mean, he never gives up. When it matters the most, he's focused and he plays his best tennis. He loves to play these kind of matches, big rivalries, semis, finals of Grand Slams."

Djokovic puts no stock in his five successive Grand Slam victories over Federer.

"Wimbledon last year, he had two match points," Djokovic said. "He was one shot away from winning that match. It's not like I've been dominating the matchups."

Courier asked Federer the question that was undoubtedly on the minds of many after his second inspired comeback: "Are you feeling something special happening here?"

"Aw, come on," Federer replied. "The draw's not getting easier. ... You know, you do feel better in a couple of days and then you just never know ... and then with these lucky escapes you might play without any expectations anymore because you know you should already be skiing in Switzerland ... [but] I'm lucky to be here, I might as well make the most of it."

Spoken like a man who could use a good miracle.