|
|
|
|
|
by shakow
94 days ago
|
|
That's what I would have thought as well, but looks like that on x86, both clang and gcc use variations of LEA. But if they're doing it this way, I'm pretty sure it must be faster, because even if you change the ×4 for a <<2, it will still generate a LEA. https://godbolt.org/z/EKj58dx9T |
|