The 32-year-old Swiss great needed just 69 minutes to book his berth in the final four, where he'll face Ukrainian Alexandr Dolgopolov.
Federer saved the only break point he faced in the match early in the opening set and clearly had the answer to the tall South African's booming serve.
Federer broke Anderson at love in the final game of the first set, then broke him twice more before finishing the match with a love service game.
"You know, I gave myself chances and started with a few more returns in play at five-all," Federer said. "I was just also now in the match at that point, feeling good movement-wise, feeling good absorbing his pace. Then also being aggressive myself.
"I think the combination there in those 10 minutes, they all worked out for me. So it was big to win the set and then to go on to break early in the second. Then double break was like a bonus. From then on I was home basically.
"It was a really good match for me," Federer said.
It was a textbook performance from the former world number one, whose ranking has slipped to eighth in the world but is projected to rise to five next week by reaching the final four.
Despite the decline in his ranking after a modest 2013 campaign, Federer is enjoying a strong start to the season. He arrived in California off an impressive title run in Dubai, where he claimed his first ATP trophy in nine months.
Federer last played Dolgopolov in the Swiss Indoors in Basel in 2010, when the Ukrainian retired while trailing.
But Federer said he had practised with Dolgopolov late last year and before the Dubai tournament, and is looking forward to facing him again.


Latest News from Sports News Desk