Here is a blogger who honestly argues that it would be better to torture people, especially juveniles, than put them in jail. He has a point. A quick round of torture would probably be less mentally and physically damaging than what actually happens to incarcerated people. It would also be cheaper, simpler, and more honest. It would also be more salient, and maybe a more effective deterrent.
Ideally, an effective punishment is one that people hate and fear, but that does not cause them a lot of actual long-term damage. Depending on the severity of the torture and the amount of jail time, I would certainly rather be tortured then spend time in jail. Of course, this may be evidence that torture would not have as much of a deterrent effect as the current system, at least for people with a long-term perspective.