In C++, is the ?: operator faster than if()...else statements? Are there any differences between them in compiled code?
Depends on your compiler, but on any modern compiler there is generally no difference. It's something you shouldn't worry about. Concentrate on the maintainability of your code.