C++

Asked • 06/18/19

Is < faster than <=?

I'm reading a book where the author says that `if( a < 901 )` is faster than `if( a <= 900 )`. Not exactly as in this simple example, but there are slight performance changes on loop complex code. I suppose this has to do something with generated machine code in case it's even true.

1 Expert Answer

By:

Hanna H. answered • 05/11/20

Tutor
5 (3)

PhD in Economist

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.