Is it more expensive to check '<=' rather than '>' ?
The first one checks both < and ==, but '>' does just one check.
Or maybe the compiler optimizes this?
It depends on what you're comparing, but for the build-in types, both are generally just one machine instruction.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With