Variable x
is int with possible values: -1, 0, 1, 2, 3
.
Which expression will be faster (in CPU ticks):
1. (x < 0)
2. (x == -1)
Nikolay, you write:
It's actually bottleneck operator in the high-load program. Performance in this 1-2 strings is much more valuable than readability...
All bottlenecks are usually this small, even in perfect design with perfect algorithms (though there is no such). I do high-load DNA processing and know my field and my algorithms quite well
If so, why not to do next:
You'll get the Answer.