When Roger Federer smacked a backhand return winner off his opponent's 229-kilometre-per-hour (142 mph) serve Friday night, he glanced at the speed readout, just to find out exactly how difficult what he'd done had been.

Then, later in his 6-4, 6-4, 6-4 victory over big-hitting Sam Groth in the U.S. Open's second round, Federer again checked out the digital display in Arthur Ashe Stadium in New York after getting a 237 km (147 mph) offering over the net en route to taking that point, too.

The 17-time major champion said that while he couldn't know for sure what the precise speeds were, he's usually pretty good at guessing.

"I'm aware of every serve, how hard it is after the point when he goes big, because I think it's interesting and I want to see," Federer said. "Sometimes I feel it, as well. I'm like, 'That felt like 138,' and it might be just a couple off. It's the same with my own serve. I can judge it probably [within] a few miles an hour."

In the third round, Federer, who has won five titles at the U.S. Open, will face 42nd-ranked Marcel Granollers of Spain.

The second-seeded Federer improved to 54-1 in second-round Grand Slam matches; the only loss came at Wimbledon last year. He's also now 24-1 over his career in matches under the lights in Ashe.

In women's action under the lights, No. 5 Maria Sharapova, a five-time major champion, avoided that sort of upset by beating 2013 Wimbledon runner-up Sabine Lisicki 6-2, 6-4.

Sharapova trailed 3-1 in the second set, but took five of the last six games after Lisicki was told by chair umpire Carlos Ramos that he thought she was receiving coaching help, which isn't allowed during Grand Slam matches.

No. 2 Halep shocked by qualifier

Second-seeded Simona Halep's recent run of Grand Slam success ended with a third-round exit Friday at the U.S. Open against a 32-year-old qualifier ranked 121st.

Halep, the runner-up at the French Open and a semifinalist at Wimbledon, had seven-double faults and only 17 winners in a 7-6 (6), 6-2 loss to Mirjana Lucic-Baroni of Croatia.

Halep was trying to make the fourth round at Flushing Meadows for the second year in a row.

But Lucic-Baroni outplayed her, totalling 31 winners, to get back to the fourth round at a Grand Slam tournament for the first time since she was a Wimbledon semifinalist as a teenager in 1999.

Venus loses match with odd scoreline

Two points from defeat, Sara Errani rallied to force a third-set tiebreaker and outlasted Venus Williams in a back-and-forth match.

Errani won 6-0, 0-6, 7-6 (5) in the third round after Williams had a chance to serve out the match in the final set.

Williams twice came back from down a break in the third but was done in by too many unforced errors. She had 52 in the match.

Errani, seeded 13th, next faces Lucic-Baroni.

Up 5-3 in the third set, the 19th-seeded Williams had one of her eight double-faults as she failed to close out the victory.

The five-foot-four Errani reached the final at the French Open and the semis at the U.S. Open in 2012, but both times she was routed by power players: Maria Sharapova and Serena Williams.

Big sister Venus couldn't do the same Friday, though she did later earn an easy victory in doubles with Serena.

Peng pulls off another upset

Peng Shuai beat another seeded player to reach her second straight Grand Slam round of 16.

Two days after upsetting fourth-seeded Agnieszka Radwanska, Peng defeated 28th-seeded Roberta Vinci 6-4, 6-3. The Chinese veteran had gone two years without making it past the second round at a major tournament before her Wimbledon run this summer. But she didn't meet any seeded players in the first three rounds there before losing to eventual champion Petra Kvitova in straight sets.

This time, Peng, ranked 39th, will face 14th-seeded Lucie Safarova or 22nd-seeded Alize Cornet to try to reach her first Grand Slam quarterfinal.

Kerber ousted by teen

Sixth-seeded Angelique Kerber also was upset, losing 6-1, 7-5 to Swiss teen Belinda Bencic. Bencic, 17, is coached by Martina Hingis's mother, Melanie Molitor, and was coming off a third-round showing at Wimbledon.

Ninth-seeded Jelena Jankovic also advanced by routing Johanna Larsson 6-1, 6-0. The 96th-ranked Larsson had upset Sloane Stephens in the second round.

The 31-year-old Vinci had made the quarter-finals at the U.S. Open the last two years but lost in the opening round at the first three major tournaments of 2014.

With third-ranked Li Na sidelined by a knee injury, Peng's success is giving the fans in China something to cheer.

Half of the top eight seeds are now gone on the women's side. Nothing like that among the men.

Eleventh-seeded Ernests Gulbis became the first man in the top 20 to lose when he blew a two-set lead to Dominic Thiem. The 20-year-old Thiem won 4-6, 3-6, 6-4, 6-3, 6-3 to reach his first Grand Slam third round.

Sixth-seeded Tomas Berdych was pushed to five sets by 65th-ranked Martin Klizan before winning 6-3, 4-6, 6-2, 3-6, 6-3.

Fourth-seeded David Ferrer advanced to the third round when Bernard Tomic withdrew because of a left hip injury. Seventh-seeded Grigor Dimitrov and 12th-seeded Richard Gasquet both moved on in straight sets.