Properly done, impalement doesn’t kill quickly, byt takes a long time to do its job.
It is intended as a graphic demonstration of punishment for the crime.
Applying the death penalty in a secret room, hidden from the public doesn’t have the same effect as doing it in public where all can see the perp’s punishment.
Impalement in order to roast on a spit however I believe is more quick. Muslims did that to Serbs when they invaded the country.