#C and Assembler
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.