The death penalty is very effective - it's just that government cannot be trusted with it. When administered correctly - by the intended victim during the commission of a crime - it provides a very valuable deterrent effect.
It might not deter them. But it would sure make sure they dont do it twice.