My spouse was called for jury duty and so we just discussed this, as it will likely be a question for potential jurors.
IMO, you have to look at what your objective is (this is a handy method for all decision making).
If the objective is to keep people from killing people, a deterrant, it doesn't work. Murder is not a rational act, most of the time. The thought of the death penalty may slow someone who is beating a man to death, but it doesn't slow someone pulling a trigger.
If the objective is to protect society from someone who cannot be relied on to refrain from beating someone to death or pulling the trigger to kill someone, then it works, that one person will not kill again, society is protected. And, no, I don't think that prison is as effective here, people get killed in prison, being in prison does not mean that the convicted cannot kill again.
If the objective is justice, then I don't know, I don't think that justice is served by putting someone to death.
Now, I realize that my position, that the death penalty is Ok in order to protect society but not to serve justice, means that the criminally insane and mentally retarded are more likely to be put to death even though they may not comprehend their crimes. But it is because they cannot comprehend what they have done that I think that they are more likely to do it again, so society is in danger. No fair trying to put them in prison for life if they kill someone who is there serving time fairly -- how would you feel if your brother was in for some petty crime, almost ready to get out and got knifed to death by some criminally insane thug who never should have been allowed to hurt another person?