CompuServe Messages

#C and Assembler

    27-Jan-89 02:33:28
Sb: #32058-#C and Assembler
Fm: Drew Lucy 76337,75
To: Fred Hewett 76046,3666
Thanks for the info on division vs shifting. As other messages point out, there is, of course, a problem with negative numbers. However, many times you are only dealing with positive numbers. The compiler could "easily" recognize unsigned variables. People alway point to FORTRAN compilers as examples of efficient code generators. They should be. They've been tweaking them for over 20 years. 🙂 I agree that the C philosophy may be to let the programmer select the most efficient method to solve a problem. I just wasn't aware of how seriously they ment it. And as I said, I thought MicroSotf C did do optimizations like replacing multiplication and division by shifting where possible. Although I've been happy with Aztec C for over there years, it's starting to look a little lame compared to Lattice 5.0.