Quote:
Originally Posted by Astro
I had to look up a wiki to find out what >> did in C programming language.
(One day i will have to learn C.)
A bitwise shift. Very neat.
Sometimes readability needs to take a back seat to performance. After all that's what comments are for.
|
Bitwise shift is a much faster alternative to multiply/divide by factors of 2 and a good complier will usually look for places where it can switch out actions like multiply by 32, divide by 1024 etc. and replace them for you. When looking for speed improvements it is often wise to decomplie the .hex file to check though.
Paul: Feel free to email the dsPIC code at any stage.