Greetings Henrik,
Is there a chance you have a lot of overhead associated with array handling? Have you looked at the assembly language generated by that routine?
I checked out the inner loop using BoostC and found worst case cycle times of 123 cycles in a "for/next" loop and 100 cycles in a "do/while" loop.
Cheerful regards, Mike
Code:crcword ^= work; // 123 cycles (BoostC) for(char i=0; i<8; i++) // { crcword >>= 1; // if(status.C) // crcword ^= 0x0A01; // }Code:crcword ^= work; i = 0; // 100 cycles (BoostC) do { // crcword >>= 1; // if(status.C) // crcword ^= 0x0A01; // i++; // } while(i.3 == 0); //




Bookmarks