On Apr 29, 2009, at 7:56 AM, M. Adam Davis wrote: > Slightly faster (since a one bit shift takes a full instruction > cycle): > temp = input; > temp = temp >> 7; > result += temp; > temp = temp >> 6; // temp = input >> 13 > result += temp; > temp = temp >> 1; // temp = input >> 14 > result += temp; > temp = temp >> 4; // temp = input >> 18 > result += temp; This is especially interesting, because after all the original "ticks" input BEFORE the multiply is already "input>>7" (it becomes a multiply by "128/125", which is just fine...) BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist