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

Shift add used to execute much faster than multiplication in 8088 days and people would use it when they had to multiply an int by a known scalar (shift took 4 clocks and add took 12).


Compilers still prefer LEA to multiply on 3,5 and 9, which performs shift+add I believe.




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

Search: