The death penalty doesn't prevent others from committing murder. No reliable study shows the death penalty deters others. To deter others a punishment must be sure and swift. The death penalty is neither. Homicide rates are higher in states and regions that have it than in those that don’t.
We have a good alternative, life without parole, on the books in 48 states. It means what it says. It is sure, swift and rarely appealed. Life without parole costs less than the death penalty.
The death penalty costs much more than life in prison, mostly because of the legal process which is supposed to prevent executions of innocent people.