3 ms·
Possibly true, but it yields less efficient code in GCC 12 for x86-64. https://godbolt.org/z/oafPrb4K8 https://godbolt.org/z/oafPrb4K8
by abainbridge 4y ago
Possibly true, but it yields less efficient code in GCC 12 for x86-64. https://godbolt.org/z/oafPrb4K8 https://godbolt.org/z/oafPrb4K8
- bonzini 4y agoBecause it's also wrong! / rounds towards zero, while summing a&b&1 requires the division to round towards negative infinity.