A resting heart rate of more than 100 beats per minute can be life-threatening. It means the heart is beating too fast to pump blood to the rest of the body, including the brain and the lungs. This can cause the heart to suddenly stop beating. It can cause a stroke or heart failure.

A implantable cardioverter defibrillator, commonly known as an ICD, can prevent sudden death, but the device has drawbacks. 

One is pain. The other is fear of defibrillation.

John O'Leary got an ICD about a year after having a heart attack.

"I had a couple of episodes where I became dizzy while exercising. I was out biking, and in one instant, actually, I think I lost conscious for a brief second or so," he said. "I thought it was probably just dehydration, heat, what have you."

But it wasn't anything he suspected. Instead, O'Leary had the classic symptoms of a heart rhythm disorder. The lower chambers of his heart were beating too fast and irregularly. The ICD acts instantly when a patient's heart rhythm goes out of sync.

Medronic, a company that makes ICDs, reports that every month, 10,000 people in the U.S. have one implanted.

Here's how it works: A doctor inserts a small electronic device under the skin, usually under the collarbone. The ICD is powered by a battery. It's connected to one or more sensing wires, called leads, that are implanted in the heart. If the heart is out of rhythm, the ICD automatically sends small electrical signals through the leads to correct it. If that doesn't work, the defibrillator delivers a shock to restore the heart to a normal rate.

"That's just the basic physics of the process," said Dr. Mehdi Razavi, an electrophysiologist at the Texas Heart Institute in Houston. "When you deliver a shock, there's pain involved."

Like 'lightning'

O'Leary didn't experience any pain, but Anne Bunting did.

"It was like being hit by lightning. I actually saw a flash of white light and the sound that lightning makes coming down a tree, and then, boom! And it shocked me five times in a row, and I was screaming. That's how much it hurt." 

Bunting got on the floor to keep herself from falling. 

Razavi said that when shocks are delivered, they can happen more than once.

"You can have half a dozen shocks in a row, and that's typically because the underlying cause has not been immediately reversed," he said.

O'Leary compares the shock to walking into a lamp post or a wall. It happened while he was walking toward his car in a parking lot.

"There was no lamp post, no wall, there was nothing between me and the car. But that's exactly what it felt like." He also saw a flash of light, which he figured to be the electrical discharge. Then he realized what had happened.

More improvements sought

Over the years, ICD designs have improved. The devices are smaller and less invasive than they used to be. But Razavi wants them smaller still. And he doesn't want patients to even notice that they are being defibrillated. He is working with an electrical engineer at the University of California-Los Angeles to develop small chips that provide small, inconspicuous shocks that return the heart to a normal rhythm, without the patient's noticing — no flash of light, no pain, no feeling of having walked into a wall.

Razavi and Aydin Babakhani, the UCLA professor of engineering, feel that they are on to something that fills the bill. It's at least five years away from being available to heart patients, but the men are confident they'll get there.