And how could Federer not be loving life? He's the best in the world at age 36. That even sounds a bit strange to Federer himself.
"Those are definitely special times in my life and my career," Federer said.
"The dream as a little boy was to make it one day to world No. 1, but not at 36 years old I can tell you that. It was probably at some point at 25 maybe if things went really well.
While this doubles match didn't officially count Monday night, it sure mattered to all of the children in Africa who Federer is committed to helping through his foundation.
More From This Section
Federer waved every which way, held his racket in the air and beamed when introduced during warmups with the announcement at the sold-out SAP Center that he had regained the No. 1 world ranking.
"For me to stand right here as world No. 1 in San Jose is very, very special for me," Federer said.
He entertained from the start, too, praising Microsoft billionaire Bill Gates as a perfect partner.
"I'll do the running and Bill does the thinking." He joked to opponent Savannah Guthrie of NBC's "TODAY" show: "You have to start looking at the ball and stop looking at me." Federer called off Gates with, "That's mine ... that's mine, too," before Sock lobbed a winner over Gates that Federer couldn't chase down.
Federer's "The Match for Africa" exhibition sold more than 15,000 tickets to benefit his foundation that supports education for children in Africa. At the end of the night, the foundation had raised another USD 2.5 million.
Federer and Gates also teamed up last year in Seattle.
After the doubles, the 25-year-old Sock -- ranked 10th in the world -- pushed Federer to an 11-9 tiebreaker in the first set before dropping the second set 6-4.
At one point in the opening set, Sock showed his respect by overturning a fault call. He walked toward the service line, pointed that it was an ace and went to the changeover.
Sock joked beforehand, "Don't hit it to Roger ... I'm winless against him for my career." "This match for Africa is something extraordinary," Sock said.
"You'll train like I do," Federer said. "You are ready." And Gates, dressed in a bright pink polo, drew oohs and aahs as he impressed with his shot-making and hustle to keep points alive.
"I think I'm good at picking partners," Gates said after he and Federer won 6-3.