Depends on the shark species, but in general they can be faster than dolphins.
There is one no dolphin will ever catch up: the shortfin mako shark.
Doesn’t it look like a torpedo?
There are different sources, but all agree it is the fastest shark, with top speeds varying from 42 to over 60 mph.
The shortfin mako is on record as the fastest-swimming shark, capable of bursts of speed up to 18.8 metres per second (68 km/h; 42 mph - See Shortfin mako shark - Wikipedia)
Once it is ready to strike, it will burst upwards, usually at speeds of around 46 mph (74 mph), attacking before the prey even knew it was there. It darts up and down and back and forth, tearing piece after piece of flesh from its prey until finally the prey is disabled and can’t fight back. Then the Mako Shark finishes it off. The Three Fastest Sharks In The World
This is a shark known to chase and catch even faster fish, such as the sailfish and swordfish, which can reach speeds more than 60 mph when leaping. Sharks Are Fast—But Some Are Faster Than Others
Other “speeders” are the salmon shark and the great white shark.
They are all from the Lamnidae family of sharks.
This family includes the great white and mako sharks. Lamnidae sharks are warm-blooded (partially endothermic) and salmon sharks are the warmest of the Lamnidaes, as warm as 20ºF (7ºC) warmer than the waters in which they swim.
When doing submarine research, the U.S. Navy became interested in how salmon sharks could travel so fast in water. Navy researchers reported clocking salmon sharks at over 50 miles per hour (80 km/hr), which puts them among the fastest of fish. Salmon Sharks
Image: Feature Species: Salmon Shark (Lamna ditropis)
The great white shark preys on dolphins,but sometimes are prey to orcas, and we will see below why:
The great white shark (Carcharodon carcharias) is thought to have a top swimming speed of 25 mph (40 kph), perhaps with short bursts of 35 mph (56 kph). Their swimming speed is 10 times faster than the typical human swimmer. Sharks Are Fast—But Some Are Faster Than Others
Image: Great White Sharks
This speed allows them to jump out of the water even considering their massive size. They are the “flying sharks”.
Also big and fast is the tiger shark (Galecerdo cuvier) achieves speeds of about 20 mph (32 kph).
No dolphins, even the fastest ones, are as fast as the mako or salmon sharks. Let’s see (The Fastest Swimming Dolphin Species)
- Dall's Porpoise. This little guy is considered the "speed demon" of dolphins. Weighing 480 pounds or less, he is one of the smaller dolphins, but his burst swimming speeds have been reported to be as fast as 34.5 miles per hour. When comparing dolphin swimming speeds, he has earned the title of fastest swimming dolphin.[*]
Image: Google Image Result for https://i.pinimg.com/originals/41/ce/77/41ce770c598625fac4d92a7cbcc741aa.jpg
- Killer Whale. The orca, or killer whale, is the largest of all dolphin species and shares the distinction of fastest dolphin. He may dwarf the Dall's porpoise in size, but he keeps pace with his tiny counterpart, swimming at burst speeds of 34.5 miles per hour. The killer whale's swimming speeds are especially impressive, considering a bull male can grow up to 32 feet long and can weigh in at a staggering 12,000 pounds.
- Bottlenose Dolphin. In comparison to the Dall's porpoise and the orca, the bottlenose dolphin seems almost slow in comparison with a maximum swimming speed of 17 miles per hour. He deserves to be mentioned, though, because he is the most popular and easily recognizable of all dolphin species.
Water is about 750 times more dense than air, which means a dolphin (or a shark) must be able to generate a tremendous amount of power in order to swim fast.
[*] Edit: Although the original source The Fastest Swimming Dolphin Species uses the term “dolphins” in general, dophins and purpoises are different families among the Delphinoidea superfamily, both are delphinoids, not “dolphins”.