As you say, is a compressed if-then-else, so it must be compiled to the same instructions with regards of the comparisons.
The real difference is that it selects a final result. Really, just syntactic sugar that improves readability.
Compare:
int val = (foobar == true) ? 500 : 1000 ;
vs:
int val = 0;
if (foobar == true)
{
val = 500;
} else {
val = 1000;
}
It can be argued that it is just a matter of style, thus subjective. But, the legibility becomes even greater when you have a more complex decision tree, such as:
int val = (flag01 == true) ?
(flag02 == true ) ? 100 : 200 :
(flag03 == true ) ? 300 : 400 ;
You can chain together many decisions in one place instead of writing a bunch of nested if-then-else clauses:
int val = 0;
if (flag01 == true)
{
if (flag02 == true)
{
val = 100;
} else {
val = 200;
}
} else {
if (flag03 == true)
{
val = 300;
} else {
val = 400;
}
}
This is somewhat following a code pattern called method chaining.