It would probably deter jaywalking better than murder. Murderers have a motive to risk at least life in prison to kill someone, so risking the death penalty is a smaller step further. On the other hand, no one is going to risk being executed to avoid walking a few feet to the crosswalk.