Federer set the pace by getting there in only 71 minutes against Marcel Granollers, the world number 34 from Spain, with Djokovic taking just 90 minutes to get past another Spaniard, Roberto Bautista-Agut, the world number 55.
Djokovic applied constant pressure with his speedy court coverage and the weight and angles of his ground strokes, and might have won in under an hour had he not lapsed briefly in the second set, letting Bautista Agut back into it.
This enabled the man nicknamed "Bati" to launch some hard blows, come from 2-5 down, and save four match points in a 24-point ninth game before going down 6-1, 7-6 (7/4).
Federer mixed phases where he appeared to be coasting, with moments when he suddenly switched two gears to deliver stunning winners, in a 6-3, 6-4 success.
He was also tactically unpredictable.
Encouraged by the fast court and perhaps by his opponent's frequent charges into the forecourt, Federer came to the net more often than usual. But he was curiously unclear about why he did not attempt this more often.
"It's something I have been trying my whole life, to be more aggressive," he said. "I would like to serve-volley more - but I'm winning, so it's okay.
"I don't know why I don't do it more. Perhaps because courts around the world are on the slower side, and you come to the quicker courts like this and you don't dare. It's a habit."
Later he explained it as an outcome of his bright new pink shoes, about which he was questioned.
"That's the problem: I come to the net and the guy knows," Federer grinned. "It ain't good, you know. Definitely not camouflage."
Djokovic's match confirmed the importance, even for the best player in the world, to keep his mind pinned down till the end.
"I played a good match for an hour or so, but then I didn't stay committed to every point," he admitted.
Djokovic now plays Andrea Seppi, the seventh seeded Italian, whose elegance off the ground may punish any further lapses more severely.
Federer will follow Djokovic with a match against Nikolay Davydenko, the former world number three who ousted the sixth seeded Janko Tipsarevic, and followed it with a 6-4, 7-6 (7/4) victory over Victor Hanescu, of Romania.
Federer has a likely semi-final with Tomas Berdych, his Wimbledon conqueror of two years ago, who overcame jet-lag, an umpire's warning, and a difficult first set against Germany's Tobias Kamke before calling for changes to the time limit rule.
Berdych emerged relieved and disgruntled after surviving 7-5, 6-1 against the world number 90, apparently under pressure from multiple sources.
One of them was the new 25-second time rule, which reduces by five seconds the permitted pause between rallies.
"I don't like it. I'm not a fan of it," he said.
"I don't see any single reason to have this rule. What could be positive on this? What could work? What could be the advantage?
"It should be more clear what's going on, because the referee has so much power on you," he reckoned.
"He can do whatever he wants. So let's put the clock there, and then everybody goes by the clock. Simple as that."
Berdych plays Dmitry Tursunov of Russia but another Russian, Mikhail Youzhny, the eighth seed, was beaten.
His conqueror was Daniel Brands, six feet five inches tall, with an imposing net game, who upset the seedings in the Gulf for the second time this year, having reached the semis in Doha.
Brands now faces Juan Martin del Potro, the fourth-seeded former US Open champion, whose 6-4, 6-4 win over Somdev Devvarman, the Indian returning after many months out with injury, received rather modest acclaim.
However his ensuing "match" with his Argentine compatriot Diego Maradona, the footballing legend who is in the country on ambassadorial duties, was received as if del Potro had scored at the Bombonera stadium in Buenos Aires.
Photos: 'Dangal' girls Sanya Malhotra, Fatima Sana Shaikh's dinner outing
Photos: Salman Khan, Daisy Shah spotted at the Mumbai airport
Photos: Rakhi Sawant to play Honeypreet in Ram Rahim biopic
Photos: Arvind Kejriwal asks Kamal Haasan to join politics
Photos: TV actress who played goddesses on the small screen