Forget elephants. Dolphins can swim circles around them when it comes to long-term memory.

Scientists in a new study repeatedly found that dolphins can remember the distinctive whistle — which acts as a name to the marine mammal — of another dolphin they haven’t seen in two decades.

Bailey the dolphin hadn’t seen another dolphin named Allie since the two juveniles lived together at the Dolphin Connection in the Florida Keys. Allie ended up in a Chicago area zoo, while Bailey got moved to Bermuda. Yet 20 1/2 years later, Bailey recognized and reacted to Allie’s distinctive signal when University of Chicago researcher Jason Bruck played it on a speaker.

Other dolphins had similar steel-trap memories. And it’s not just for relatives. It’s non-kin too.

“It’s mind-blowing; I know I can’t do it,” Bruck says. “Dolphins in fact have the longest social memory in all of the animal kingdom because their signature whistle doesn’t change.”

Studies have shown that monkeys can remember things for about four years and anecdotes have elephants remembering for about 10, Bruck says in a paper published today by Proceedings of the Royal Society B. But remembering just a sound — no visuals were included — boggles even human minds, he says.

For Bruck, 33, it’s as if a long-lost schoolmate called him up and Bruck would be able to figure out who it was just from the voice.

Faces, yes, old photographs, definitely, but voices that change with time, no way, Bruck says.

“We’re not as acoustically as adept as dolphins,” Bruck says. It helps that dolphins have massive parts of the brain that are geared toward sound.

Bruck thinks dolphins have the incredible memory because it could help them when they approach new dolphins on a potential group hunt. And even more likely it probably allows dolphins to avoid others that had mistreated them in the past or dominated them, he says.