These genes were involved in a wide variety of processes, such as blood clotting, sleep and hair growth. Although some of the genes had been flagged before, others had not been identified. (Dr. Hiller and colleagues had previously found that genes necessary for the development of hair had been lost in cetaceans, which perhaps reduced drag as the animals swam through the water.)

“Many of the things we found were at least for me quite unexpected,” said Dr. Hiller.

For instance, one of the lost genes produces an enzyme involved in DNA repair. Because whales and dolphins go without fresh oxygen for long periods of time, their DNA is often damaged and must be mended. But this particular repair enzyme does messy work, introducing errors even as it fixes. Other, less mistake-prone enzymes are still found in cetaceans; this led the researchers to conclude that the gene for the messy enzyme may have been discarded because, in a living situation with frequent DNA repair, it did more harm than good.

Other lost genes were involved in blood coagulation. You might think that jettisoning such genes might seem a risky evolutionary gambit, but when cetaceans dive, their blood vessels narrow and nitrogen bubbles in their blood make clots more likely to form. Getting rid of clotting genes may have been a healthy move in the long run.

Four genes related to melatonin, a sleep hormone, were also lost. In most creatures, melatonin production rises as the body prepares for sleep. But cetaceans do not sleep the way most mammals do. Instead, half the brain slumbers while the other half monitors the nearby environment. Living underwater, “you cannot really have extended periods of sleep where the body is largely inactive,” said Dr. Hiller. Under those circumstances, he added, melatonin may have been counterproductive.