Shanghai, Shanghai, China, 16 October 2015 | AAP

Bernard Tomic has earned a shot at world No.1 Novak Djokovic after reaching his ninth quarterfinal of the year at the Shanghai Masters.

Backing up his straight-sets win over world No.8 David Ferrer, Tomic turned the tables on 11th seed Richard Gasquet with an equally impressive 6-3 6-7(1) 6-4 victory over the Wimbledon semifinalist.

Gasquet had dominated Tomic in the past and beaten┬áthe Australian in straight sets at last month’s US Open in New York.

But Tomic fired down 19 aces to oust the Frenchman and continue his surge up the rankings in pursuit of an all-important top-16 seeding at the Australian Open in January.

Having cracked the world’s top 20 for the first time last month, the 22-year-old is projected to rise to a new career-high of No.18 next week.

“It’s not easy playing a guy you’ve lost to six times from the seven times you’ve played,” Tomic said.

“I had to go out there changing my game. I served very good today and I kept on the baseline; normally against him I get pushed back and it’s the worst thing to allow myself against him.

“I’m attacking on the right points and I’m aggressive on the baseline, and that’s what’s causing me to play very good and I’m serving very well on top of that. So there’s a few areas I’d like to work on over the next few weeks, but for now it’s been pretty good and I have to go for it against Novak.”

Djokovic sped through the third round with a 6-2 6-3 win over Feliciano Lopez in just 71 minutes as he continued his magical run in China.

The Serb’s current unbeaten run dates back to the Cincinnati Masters final in August and with his win in Beijing, he became the first man to top $US15 million ($A20.5 million) in prize money in a single year.

The No.1 warned there was still room for improvement despite putting together what he calls his best season yet, after winning three out of four Grand Slam finals to reach a career total of 10.

But while Djokovic has been flying through his matches, Tomic’s late-night win over Gasquet in little over two hours will give him less time to prepare and recover for their big clash on Friday night.

“Obviously it’s the worst time to finish, so I have to try as best as I can,” Tomic said. “I’m playing Novak, the worst thing now for me is I don’t have much recovery (time), but I try my best.

“The last eight matches, nine matches, he hasn’t gone worse than 6-3 in a set … it’s amazing the way he’s playing.

“I know in Wimbledon in the third round I played well but I had no chances and maybe my chances will come this time.”

Djokovic admitted his confidence was sky high as he remained in the form that took him to his sixth China Open title last week.

The winner of the Djokovic-Tomic clash will meet either Andy Murray or Tomas Berdych in the semi-finals.