Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interesting example, I came up with clang 3.9 producing an imul with 11 though.


With 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: