When `long long` Outperforms: Large Range Needs

While C `int` is often fastest, `long long` becomes optimal for loops with extremely large iteration counts (e.g., > 2 billion on a 32-bit system) where `int` would overflow. The slight speed trade-off is often negligible for the expanded range.

Sources

Open the full topic