LONDON -- It was less than a week ago when Roger Federer had one of his worst performances in the season-ending championships of his career. He was off his game and out of sorts.
Still, after the match, Federer told us in no uncertain terms not to worry. It'll get better. And it did.
Sitting on 99 career titles, Federer marched into the last four of the Nitto ATP Finals on Thursday with a stellar 6-4, 6-3 win against Kevin Anderson in the final match of the round-robin stage.
At this stage of his career, Federer has learned not to get ahead of himself. He finished as the top seed in his group, a remarkable turnaround considering that loss to Kei Nishikori in his opener Sunday.
First there was Federer's straight-sets drubbing of Dominic Thiem on Tuesday to keep alive the world No. 3's chances of progressing. On Thursday, he found his form again, much to the delight of the crowd inside London's O2, many of whom wore their RF shirts proudly.
Federer is into the semifinals for the 15th time in 16 appearances, and because he is the top seed, he'll likely avoid Novak Djokovic -- who stands atop of the other group going into Friday's final set of round-robin matches -- in the semifinals.
For Federer, a six-time champion at this event, there is a lot on the line, if milestones mean anything.
"Personally, I'm still not thinking of the number 100," Federer said after the match. "I won't let that get in my head, make me go crazy, because it should be something I'm excited about and not something I should feel extra pressure.
"As long as I think Novak is in the draw anyhow, he's playing so good again, it's never going to be easy.
"I think it's just going to be hard to finish it. I'm happy I gave myself the opportunity. I'm happy that I'm raising my level of play throughout this week. This is what I hope to do. It's exciting to be in this situation now, of course, no doubt."
Maybe it was the thought of a small measure of revenge that got Federer's blood going Thursday.
It was Anderson who ended his hopes of a record ninth Wimbledon title this summer when he won their quarterfinal 13-11 in the final set. In that match, Federer squandered a two sets-to-love lead.
As Federer admitted on the eve of the event, that result and a round-robin win in London will not replace a Wimbledon defeat. But Thursday's victory showed he is back on track and looking strong heading into the weekend.
"I've always tried to pace myself in a way, set up my schedule in a way that I would have something left in the tank, I would peak at this event," Federer said.
"I'm happy that this is another week like this. Didn't look like it maybe 72 hours ago. But I was able to come back and play good tennis."
Federer, 37, was sharp and agile and, quite frankly, too good for Anderson, who nonetheless moves on to the final four as the second seed in his group.
As his career has progressed, Federer has managed to adapt his schedule, playing fewer tournaments as he entered his 30s. Less is more, he has said.
That was the case the other day when he bailed on practice following his loss to Nishikori, something he repeated after beating Thiem in his second match and something he plans to do again Friday.
The breaks have allowed him to reset his mind. The bad news for whomever he plays in the semifinals is that even at the end of a tough season, Federer feels good.
"I'm happy I still have some energy left in the tank," Federer said. "It's been a long year for all of us, but maybe the break in the summer maybe helps me a little bit.
"At least the mental side, to tell myself, I should be fine somehow even if I am not the youngest. I'm happy how I am playing. I just want to enjoy myself and play one more good match and see what happens."
Considering his improvement from Day 1 to now, it looks like only good things are in store.