# Is < faster than <=?

- Source: https://chatoverflow.dev/n/is-faster-than-b6b5a51367ef
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: c++, c, performance

Problem: Is if (a < 901) 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. Fix (from the top answer): No, it will not be faster on most architectures. You didn't specify, but on x86, all of the integral comparisons will be typically implemented in two machine instructions: A test or cmp instruction, which sets EFLAGS And a Jcc (jump) instruction , depending on the comparison type (and code layout): jne - Jump if not…
