Microbenchmark shows conditionals are wildly faster:
Warming up --------------------------------------
simple if 416.263k i/100ms
simple exception 105.397k i/100ms
Calculating -------------------------------------
simple if 16.148M (± 1.5%) i/s - 80.755M in 5.002331s
simple exception 1.298M (± 1.8%) i/s - 6.535M in 5.034078s
Comparison:
simple if: 16147688.0 i/s
simple exception: 1298493.6 i/s - 12.44x slower
This looks terrible. The example without the exception is over 12x as fast. We could do 15 MILLION more iterations per second if not for the exception handling!
In the "expensive" example, we add 1 millisecond of sleep to simulate a small level of work. In a request to a Rails app, you're almost guaranteed to be spending more than 1ms (one DB query alone is likely to blow past that), but this is just to illustrate the effect that even a tiny amount of work has on that 12x factor we saw above. Have a gander at the result:
Warming up --------------------------------------
expensive if 76.000 i/100ms
expensive exception 74.000 i/100ms
Calculating -------------------------------------
expensive if 741.318 (± 1.6%) i/s - 3.724k in 5.024683s
expensive exception 744.120 (± 3.2%) i/s - 3.774k in 5.076659s
Comparison:
expensive exception: 744.1 i/s
expensive if: 741.3 i/s - same-ish: difference falls within error
The difference disappears completely. The exception resulted in virtually no performance penalty.