I was testing some sorting algorithms and measuring their execution time and found something quite strange and came up with the question, is >= faster than > ?
I was testing some sorting algorithms and measuring their execution time and found something
Share
CPU architecture specific. How can you measure it on modern processors anyway?
However if key is not really an int (that is you anonymized it to one) and there is no specific overloaded operator for <= than the code performance of <= will be much worse than <.
In your specific algorithm, changing between <= and < is going to wreck you algorithm so that’s what happened here.