Weighing in at as much as 25 large elephants combined and measuring up to the length of a basketball court, the blue whale is the largest animal ever known to have lived on Earth.

And while the gentle giants are known to feast almost exclusively on krill, little was known about how they could power their massive bodies on the tiny crustaceans.

However, a recent study by researchers at the U.S.-based National Oceanic and Atmospheric Administration reveals blue whales are not indiscriminate in their hunt for krill: they use "efficient foraging strategies" to optimize energy use and conserve oxygen.

It was previously thought that large, filter-feeding whales haphazardly consumed their prey throughout the day, regardless of the distribution of krill in the ocean.

But the researchers found that blue whales target parts of the ocean where the krill is the "densest" and of the "highest quality."

"Now we know that optimizing their feeding behaviour is another specialization that makes the most of the food available," lead author Elliott Hazen said in a statement.

The study compared the scavenging techniques of 14 tagged blue whales to 41 others that had been previously tagged off the coast of California. It also used acoustic surveys to identify krill patches in oceans across the globe.

Researchers discovered there was a minimum amount of krill that determined if the whales decided to expend the massive of amounts of energy needed to dive and hunt down the dense patches that are often deep in the ocean and difficult to spot.

"The magic number for krill seems to be about 100 to 200 individuals in a cubic metre of water," said Hazen.

"If it's below that range, blue whales use a strategy to conserve oxygen and feed less frequently. If it's above that, they'll feed at very high rates and invest more effort."

The scientists believe that the blue whales attempt to conserve oxygen and energy for future dives, doing so because they survive on an "energetic knife-edge."

When the blue whales identified dense patches of krill, they ramped up their "lunge-feeding," even though it requires more effort.

Study co-author Ari Friedlaender said this behaviour is necessary because the animals "don't live in a world of excess and the decisions (they) make are critical to their survival."

"If you stick your hand into a full bag of pretzels, you're likely to grab more than if you put your hand into a bag that only had a few pretzels," said Friedlaender.

Researchers hope that their findings will help figure out how to protect the species, which is classified as endangered by the International Union for Conservation of Nature.

"If they are disturbed during the intense, deep-water feeding, it may not have consequences today, or this week, but it could over a period of months," said Friedlaender. "There can be impacts on their overall health, as well as on their fitness and viability for reproduction."

The study was published in the journal Science Advances on Friday.