4 ms·
Interesting example, I came up with clang 3.9 producing an imul with 11 though.
by boterock 10y ago
Interesting example, I came up with clang 3.9 producing an imul with 11 though.
- JoshTriplett 10y agoWith optimization turned on? GCC produces an lea that multiplies by 5 into %rax for the return value, then another lea that multiplies that by 2 and adds the original.