"I'm in a good spot right now," Federer said. "I want to enjoy it as long as it lasts."
As Federer took the first step toward a possible quarterfinal meeting with nemesis Rafael Nadal, No. 5 Tomas Berdych and No. 10 Milos Raonic also picked up straight-set victories.
On a day that American men went 5-1, led by No. 13 John Isner and No. 26 Sam Querrey, a handful of seeded men made quick departures. No. 14 Jerzy Janowicz of Poland, a semifinalist at Wimbledon last month, was the most surprising to go, although he was treated by a trainer for a painful back during a 6-4, 6-4, 6-2 loss to 247th-ranked qualifier Maximo Gonzalez of Argentina.
"It was like someone puts a knife through your lower back," Janowicz said.
Janowicz is a volatile character, and that was on full display. He pounded two balls in anger into the stands. He swatted one serve underhand. He chucked his racket. He argued with the chair umpire.
Joining him on the way out were No. 15 Nicolas Almagro, No. 25 Grigor Dimitrov and No. 28 Juan Monaco.
Four seeded women were beaten in early action: No. 11 Sam Stosur, who won the 2011 U.S. Open, along with No. 17 Dominika Cibulkova, No. 20 Nadia Petrova and No. 31 Klara Zakopalova.
Stosur was eliminated 5-7, 6-4, 6-4 by 17-year-old American qualifier Victoria Duval, who is ranked 296th and never before had faced a top-20 opponent or won a Grand Slam match.
"I know she didn't play her best today, and this is the best I've played in my career, so I'm really excited," Duval told the Louis Armstrong Stadium crowd. "I just tried to stay in the moment."
No. 2 Victoria Azarenka, the 2012 U.S. Open runner-up and a two-time Australian Open winner, swept Dinah Pfizenmaier 6-0, 6-0 in the night session, after men's top seed and six-time major champion Novak Djokovic's 6-1, 6-2, 6-2 win over Ricardas Berankis.
Federer says he doesn't fret about being seeded seventh at Flushing Meadows, a year after being seeded No. 1. That didn't really affect Tuesday's opponent in Arthur Ashe Stadium.
"He achieved so much. He's the best player of all time. So I don't think people can actually say something [negative] about the way he's playing," Zemlja said.
O Wednesday 11 a.m. and 5 p.m., ESPN2