This won't be, as you may suppose, any sort of defense or condemnation of capital punishment. I just wanted to share an intriguing quote on the topic from chapter 2 of The Idiot, by Fyodor Dostoevsky.
“It's a good thing, at least, that there is not much pain,” he observed, “when the head falls off.”
“Do you know,” Myshkin answered warmly, “you've just made that observation and everyone says the same, and the guillotine was invented with that objective. But the idea occurred to me at the time that perhaps it made it worse. That will seem to you an absurd and wild idea, but if one has some imagination, one may suppose even that. Think! if there were torture, for instance, there would be suffering and wounds, bodily agony, and so all that would distract the mind from spiritual suffering, so that one would only be tortured by wounds till one died. But the chief and worst pain may not be in the bodily suffering but in one's knowing for certain that in an hour, and then in ten minutes, and then in half a minute, and then now, at the very moment, the soul will leave the body and that one will cease to be a man and that that's bound to happen; the worst part of it is that it's certain. When you lay your head down under the knife and hear the knife slide over your head, that quarter of a second is the most terrible of all. You know this is not only my imagination, many people have said the same. I believe that so thoroughly that I'll tell you what I think. To kill for murder is a punishment incomparably worse than the crime itself. Murder by legal sentence is immeasurably more terrible than murder by brigands. Anyone murdered by brigands, whose throat is cut at night in a wood, or something of that sort, must surely hope to escape till the very last minute. There have been instances when a man has still hoped for escape, running or begging for mercy after his throat was cut. But in the other case all that last hope, which makes dying ten times as easy, is taken away for certain. There is the sentence, and the whole awful torture lies in the fact that there is certainly no escape, and there is no torture in the world more terrible. You may lead a soldier out and set him facing the cannon in battle and fire at him and he'll still hope; but read a sentence of certain death over that same soldier, and he will go out of his mind or burst into tears. Who can tell whether human nature is able to bear this without madness? Why this hideous, useless, unnecessary outrage? Perhaps there is some man who has been sentenced to death, been exposed to this torture and has then been told ‘you can go, you are pardoned.’ Perhaps such a man could tell us. It was of this torture and of this agony that Christ spoke, too. No, you can't treat a man like that!”