3 ms·
It would work, but the point is not golfing but convincing the compiler to generate a cmov. The branches of your ?: have side effects, so it won't be easier for
by gpderetta 5y ago
It would work, but the point is not golfing but convincing the compiler to generate a cmov. The branches of your ?: have side effects, so it won't be easier for the compiler to optimize than a normal if.
- contravariant 5y agoHonestly I was mostly curious if it would even work, because it sure looks like it ought not to.