Variable x is int with possible values: -1, 0, 1, 2, 3. Which expression will be faster (in CPU ticks):
x
-1, 0, 1, 2, 3
1. (x < 0) 2. (x == -1)
It depends on the architecture, but the x == -1 is more error-prone. x < 0 is the way to go.